在转化 API 网关中加入新的 Meta Pixel 像素代码。
POST https://{capig_domain}/capig/graphql/ _________________________________________________________________________________________________________________ mutation AddNewPixelModalMutation( $tenantId: ID! $input: PixelConnectionCreationInput! ) { tenantMutations(tenantId: $tenantId) { signalMutations { setupPixelSignalConfig(input: $input) { id domains connectionId connectionStatus { id accessTokenAvailable active connected accessKey eventBridgeActive publishingEnabled apiErrorCode pixelID pixelName lastPublished totalEventsPublished lastReceived totalEventsReceived } } } } } _________________________________________________________________________________________________________ tenantId: ID! _________________________________________________________________________________________________________ input PixelConnectionCreationInput { businessId: String! pixelId: String! accessToken: String! apiVersion: String externalId: String! name: String }
字段 | 描述 |
---|---|
| 必要 账户的唯一标识符 |
PixelConnectionCreationInput
字段 | 描述 |
---|---|
| 必要 账户的业务编号 |
| 必要 需集成的 Pixel 像素代码编号 |
| 必要 MBE 设置中或从事件管理工具中手动生成的访问口令 |
| 可选 图谱 API 的最新 API 版本 |
| 必要 这应与设置对象中的 |
| 可选 Pixel 像素代码的名称 |
字段 | 描述 |
---|---|
| Pixel 像素代码配置 |
代码 | 描述 |
---|---|
400 | 提供的输入无效 |
401 | 用户未获授权,无法设置 Pixel 像素代码配置 |
500 | 内部服务器错误 |
更改
mutation AddNewPixelModalMutation( $tenantId: ID! $input: PixelConnectionCreationInput! ) { tenantMutations(tenantId: $tenantId) { signalMutations { setupPixelSignalConfig(input: $input) { id domains connectionId connectionStatus { id accessTokenAvailable active eventBridgeActive publishingEnabled apiErrorCode pixelID pixelName lastPublished totalEventsPublished lastReceived totalEventsReceived } } } } }
变量
{ "tenantId": "IaoreXfj", "input": { "pixelId": "18904456377094531", "businessId": "2840127409433732", "accessToken": "<accessToken>", "apiVersion": "v14.0", "externalId": "633612748410ba6e902" } }
{ "data": { "tenantMutations": { "signalMutations": { "setupPixelSignalConfig": { "id": "SignalConfig:18904456377094531", "domains": [], "connectionId": "18904456377094531", "connectionStatus": { "id": "ConnectionStatus:18904456377094531", "accessTokenAvailable": true, "active": true, "eventBridgeActive": true, "publishingEnabled": true, "apiErrorCode": null, "pixelID": "18904456377094531", "pixelName": null, "lastPublished": 0.0, "totalEventsPublished": 0.0, "lastReceived": 0.0, "totalEventsReceived": 0.0 } } } } } }
从网关中删除现有 Pixel 像素代码。
POST https://{capig_domain}/capig/graphql/ _________________________________________________________________________________________________________________ mutation DeleteDataSourceModalMutation( $id: ID! $tenantId: ID! ) { tenantMutations(tenantId: $tenantId) { signalMutations { deleteDataSource(id: $id) } } } _________________________________________________________________________________________________________ id: ID! _____________________________________________________________________________________________________________ tenantId: ID!
字段 | 描述 |
---|---|
| 必要 Pixel 像素代码编号 |
| 必要 |
字段 | 描述 |
---|---|
布尔值 | 指示是否已成功删除 Pixel 像素代码 |
代码 | 描述 |
---|---|
401 | 用户未获授权,无法移除 Pixel 像素代码配置。 |
404 | 找不到 Pixel 像素代码。 |
500 | 内部服务器错误 |
更改
mutation DeleteDataSourceModalMutation( $id: ID! $tenantId: ID! ) { tenantMutations(tenantId: $tenantId) { signalMutations { deleteDataSource(id: $id) } } }
变量
{ "id":"18904456377094531", "tenantId":"IaoreXfj" }
{ "data": { "tenantMutations": { "signalMutations": { "deleteDataSource": true } } } }
更改网关的 Pixel 像素代码事件接收状态。
POST https://{capig_domain}/capig/graphql/ _________________________________________________________________________________________________________________ mutation updateSignalConfigStatusMutation( $id: ID!, $tenantId: ID!, $input: SignalConfigStatusInput!) { tenantMutations(tenantId: $tenantId) { signalMutations { updateSignalConfigEventsStatus(id: $id, input: $input) { success connectionStatus { id accessTokenAvailable active connected accessKey eventBridgeActive publishingEnabled apiErrorCode pixelID pixelName lastPublished totalEventsPublished lastReceived totalEventsReceived } } } } } _________________________________________________________________________________________________________ id: ID! _____________________________________________________________________________________________________________ tenantId: ID! ________________________________________________________________________________________________________ input SignalConfigStatusInput { status: Int! }
字段 | 描述 |
---|---|
| 必要 需配置的 Pixel 像素代码编号 |
| 必要 |
字段 | 描述 | ||||||
---|---|---|---|---|---|---|---|
| 必要
|
UpdateSignalConfigStatusPayload
字段 | 描述 |
---|---|
| 指示对 Pixel 像素代码执行的操作是否成功 |
| Pixel 像素代码连接配置 |
代码 | 描述 |
---|---|
401 | 未获授权,无法对 Pixel 像素代码执行操作 |
500 | 内部服务器错误 |
更改
mutation updateSignalConfigStatusMutation( $id: ID!, $tenantId: ID!, $input: SignalConfigStatusInput!) { tenantMutations(tenantId: $tenantId) { signalMutations { updateSignalConfigEventsStatus(id: $id, input: $input) { success connectionStatus { id connected active eventBridgeActive publishingEnabled } } } } }
变量
{ "id": "18904456377094531", "tenantId": "IaoreXfj", "input": { "status": 1 } }
{ "data": { "tenantMutations": { "signalMutations": { "updateSignalConfigEventsStatus": { "success": true, "connectionStatus": { "id": "ConnectionStatus:18904456377094531", "connected": true, "active": true, "eventBridgeActive": true, "publishingEnabled": true } } } } } }
更改 Pixel 像素代码的事件发布状态。如果停用,网关将放弃收到的事件,且不会发布到 Meta。
POST https://{capig_domain}/capig/graphql/ _________________________________________________________________________________________________________________ mutation updateSignalConfigCapiPublishMutation( $id: ID!, $tenantId: ID!, $input: SignalConfigStatusInput!) { tenantMutations(tenantId: $tenantId) { signalMutations { updateSignalConfigCapiPublish(id: $id, input: $input) { success connectionStatus { id accessTokenAvailable active connected accessKey eventBridgeActive publishingEnabled apiErrorCode pixelID pixelName lastPublished totalEventsPublished lastReceived totalEventsReceived } } } } } _________________________________________________________________________________________________________ id: ID! _____________________________________________________________________________________________________________ tenantId: ID! ________________________________________________________________________________________________________ input SignalConfigStatusInput { status: Int! }
字段 | 描述 |
---|---|
| 必要 需配置的 Pixel 像素代码编号 |
| 必要 |
字段 | 描述 | ||||||
---|---|---|---|---|---|---|---|
| 必要
|
UpdateSignalConfigStatusPayload
字段 | 描述 |
---|---|
| 指示对 Pixel 像素代码执行的操作是否成功 |
| Pixel 像素代码连接配置 |
代码 | 描述 |
---|---|
401 | 未获授权,无法对 Pixel 像素代码执行操作 |
500 | 内部服务器错误 |
更改
mutation updateSignalConfigCapiPublishMutation( $id: ID!, $tenantId: ID!, $input: SignalConfigStatusInput!) { tenantMutations(tenantId: $tenantId) { signalMutations { updateSignalConfigCapiPublish(id: $id, input: $input) { success connectionStatus { id active eventBridgeActive publishingEnabled } } } } }
变量
{ "id": "18904456377094531", "tenantId": "IaoreXfj", "input": { "status": 0 } }
{ "data": { "tenantMutations": { "signalMutations": { "updateSignalConfigCapiPublish": { "success": true, "connectionStatus": { "id": "ConnectionStatus:18904456377094531", "active": false, "eventBridgeActive": true, "publishingEnabled": false } } } } } }
根据事件名称和 Pixel 像素代码编号更改 Pixel 像素代码的事件发布状态。如果停用,网关将放弃这些事件,且不会发布到 Meta。
POST https://{capig_domain}/capig/graphql/ _________________________________________________________________________________________________________________ mutation EventFilterStatusMutation($tenantId: ID!, $input: UpdateEventFilterInput!) { tenantMutations(tenantId: $tenantId) { updateEventFilter(input: $input) { updatedFilter { id eventName pixelId filterState } } } } _________________________________________________________________________________________________________ tenantId: ID! _____________________________________________________________________________________________________________ input UpdateEventFilterInput { eventName: String! pixelIds: [String!] filterState: EventFilterState! }
字段 | 描述 |
---|---|
| 必要 |
字段 | 描述 |
---|---|
| 必要 要筛选的事件名称 |
| 可选 需应用筛选条件的 Pixel 像素代码编号列表。如果设置为 null,则更新账户的所有 Pixel 像素代码 |
| 必要 筛选状态 |
UpdateEventFilterResult
字段 | 描述 |
---|---|
| 已更新事件筛选条件 |
代码 | 描述 |
---|---|
401 | 未获授权,无法更新事件筛选条件 |
500 | 内部服务器错误 |
更改
mutation EventFilterStatusMutation($tenantId: ID!, $input: UpdateEventFilterInput!) { tenantMutations(tenantId: $tenantId) { updateEventFilter(input: $input) { updatedFilter { eventName pixelId filterState } } } }
变量
{ "tenantId": "IaoreXfj", "input": { "eventName": "AddToCart", "pixelIds": ["18904456377094531"], "filterState": "PUBLISH" } }
{ "data": { "tenantMutations": { "updateEventFilter": { "updatedFilter": { "eventName": "AddToCart", "pixelId": "18904456377094531", "filterState": "PUBLISH" } } } } }
阻止接收特定网站的事件。
POST https://{capig_domain}/capig/graphql/ _________________________________________________________________________________________________________________ mutation useComitDomainFilterChangeMutation($tenantId: ID!, $input: UpdateDomainFilterInput!) { tenantMutations(tenantId: $tenantId) { updateDomainFilter(input: $input) { updatedFilter { id domain pixelId filterState } } } } _________________________________________________________________________________________________________ tenantId: ID! _____________________________________________________________________________________________________________ input UpdateDomainFilterInput { domain: String! pixelIds: [String!] filterState: DomainFilterState! }
字段 | 描述 |
---|---|
| 必要 |
字段 | 描述 |
---|---|
| 必要 要筛选的网域名称 格式应为 example.com |
| 可选 需应用筛选条件的 Pixel 像素代码编号列表 |
| 必要 筛选状态 |
UpdateDomainFilterResult
字段 | 描述 |
---|---|
| 网域筛选对象 |
代码 | 描述 |
---|---|
401 | 未获授权,无法更新网域筛选条件 |
500 | 内部服务器错误 |
更改
mutation useComitDomainFilterChangeMutation($tenantId: ID!, $input: UpdateDomainFilterInput!) { tenantMutations(tenantId: $tenantId) { updateDomainFilter(input: $input) { updatedFilter { id domain pixelId filterState } } } }
变量
{ "tenantId": "IaoreXfj", "input": { "domain": "example.com", "filterState": "DROP" } }
"data": { "tenantMutations": { "updateDomainFilter": { "updatedFilter": { "id": "DomainFilter:example.com:global", "domain": "example.com", "pixelId": null, "filterState": "DROP" } } } }