將 Meta 像素加入轉換 API 閘道。
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
欄位 | 說明 |
---|---|
| 必要項目 帳號的企業編號 |
| 必要項目 需要整合的像素編號 |
| 必要項目 透過 MBE 設定或從事件管理工具手動產生的存取權杖 |
| 選填 圖形 API 的最新 API 版本 |
| 必要項目 此項目應該與設定物件中的 |
| 選填 像素的名稱 |
欄位 | 說明 |
---|---|
| 像素配置 |
代碼 | 說明 |
---|---|
400 | 提供了無效的輸入 |
401 | 用戶無權設定像素配置 |
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 } } } } } }
從閘道刪除現有像素。
POST https://{capig_domain}/capig/graphql/ _________________________________________________________________________________________________________________ mutation DeleteDataSourceModalMutation( $id: ID! $tenantId: ID! ) { tenantMutations(tenantId: $tenantId) { signalMutations { deleteDataSource(id: $id) } } } _________________________________________________________________________________________________________ id: ID! _____________________________________________________________________________________________________________ tenantId: ID!
欄位 | 說明 |
---|---|
| 必要項目 像素編號 |
| 必要項目 |
欄位 | 說明 |
---|---|
布林值 | 指出像素是否已成功刪除 |
代碼 | 說明 |
---|---|
401 | 用戶無權移除像素配置。 |
404 | 找不到像素。 |
500 | 內部伺服器錯誤 |
變異
mutation DeleteDataSourceModalMutation( $id: ID! $tenantId: ID! ) { tenantMutations(tenantId: $tenantId) { signalMutations { deleteDataSource(id: $id) } } }
變數
{ "id":"18904456377094531", "tenantId":"IaoreXfj" }
{ "data": { "tenantMutations": { "signalMutations": { "deleteDataSource": true } } } }
變更閘道的像素事件接收狀態。
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! }
欄位 | 說明 |
---|---|
| 必要項目 需要配置的像素編號 |
| 必要項目 |
欄位 | 說明 | ||||||
---|---|---|---|---|---|---|---|
| 必要項目
|
UpdateSignalConfigStatusPayload
欄位 | 說明 |
---|---|
| 指出對像素的操作是否成功 |
| 像素連線配置 |
代碼 | 說明 |
---|---|
401 | 無權在像素上執行動作 |
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 } } } } } }
變更像素的事件發佈狀態。如果停用,閘道將捨棄接收到的事件且不會將其發佈到 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! }
欄位 | 說明 |
---|---|
| 必要項目 需要配置的像素編號 |
| 必要項目 |
欄位 | 說明 | ||||||
---|---|---|---|---|---|---|---|
| 必要項目
|
UpdateSignalConfigStatusPayload
欄位 | 說明 |
---|---|
| 指出對像素的操作是否成功 |
| 像素連線配置 |
代碼 | 說明 |
---|---|
401 | 無權在像素上執行動作 |
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 } } } } } }
依事件名稱和像素編號變更像素的事件發佈狀態。如果停用,閘道將捨棄這些事件且不會將其發佈到 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! }
欄位 | 說明 |
---|---|
| 必要項目 |
欄位 | 說明 |
---|---|
| 必要項目 要篩選的事件名稱 |
| 選填 需要套用篩選器的像素編號清單。如果提供 null,則將更新該帳號的所有像素 |
| 必要項目 篩選器的狀態 |
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 |
| 選填 需要套用篩選器的像素編號清單 |
| 必要項目 篩選器的狀態 |
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" } } } }