使用 Data Manager API 時,Destination 概念和要求標頭都會經常出現。請參閱本指南,瞭解如何針對不同情境設定目的地和標題。
使用目的地或標題的時機
在擷取要求中使用
Destination。擷取要求會使用IngestionService在目標對象中新增或移除成員,或是傳送事件。IngestAudienceMembersRequest或IngestEventsRequest中的destinations清單定義:- 接收資料的帳戶。例如 Google Ads 帳戶或 Google Analytics 資源。
- 帳戶中資料的目的地實體,例如 Google Ads 轉換動作或 Google Analytics 資料串流。
- 要求憑證的存取路徑,該憑證可存取接收資料的帳戶。
您可以在同一個擷取要求中加入多個目的地。
在建立、更新、刪除或擷取資源的資源管理要求中,使用要求標頭。標頭會定義要求憑證的存取路徑,以便存取資源管理要求的目標帳戶。以下列出支援要求標頭的資源管理方法:
舉例來說,如果您想建立目標對象、將成員新增至目標對象、檢查診斷結果,然後擷取目標對象以檢查其大小,以下是每個步驟、要使用的要求類型,以及是否應使用目的地或要求標頭:
| 步驟 | 要求類型 | 目的地或要求標頭 |
|---|---|---|
| 建立目標對象 | 資源管理 | 要求標頭 |
| 新增目標對象成員 | 擷取 | 目的地 |
| 查看診斷資訊 | 擷取 | 目的地 |
| 擷取目標對象 | 資源管理 | 要求標頭 |
如要切換查看各要求類型的詳細資料,請點選每個表格周圍的「擷取」或「資源管理」分頁。
如果您是廣告主或代理商,請參閱廣告主情境,瞭解如何設定標題及建構 Destination:
如果您是資料合作夥伴,請參閱資料合作夥伴情境,瞭解如何設定標頭及建構 Destination,以便管理資源並將資料傳送至已連結您資料合作夥伴帳戶的帳戶:
「詳細規定」一節深入說明相關規定和驗證規則。
廣告主情境
以下說明如何為廣告主和代理商的常見情境設定 Destination 或要求標頭。此圖說明 Data Manager API 如何使用憑證和 Destination 欄位存取廣告主帳戶。
Google Ads
下圖顯示一組 Google Ads 帳戶和使用者的範例。
- 管理員帳戶 M1
M1 有兩個直接子帳戶:
- 管理員帳戶 M2
- 客戶帳戶 C1
Google 帳戶「
cloudysanfrancisco@gmail.com」是 M1 的使用者。- 管理員帳戶 M2
M2 有兩個直接子帳戶:
- 客戶帳戶 C1
- 客戶帳戶 C2
Google 帳戶
baklavainthebalkans@gmail.com是 M2 的使用者。- 客戶帳戶 C1
C1 有兩個直屬上層管理員帳戶:
- 管理員帳戶 M1
- 管理員帳戶 M2
Google 帳戶
jeffersonloveshiking@gmail.com是 C1 的使用者。- 客戶帳戶 C2
管理員帳戶 M2 是 C2 的唯一直接上層。
列出的 Google 帳戶都不是 C2 的使用者。
直接存取情境和管理員存取情境說明如何設定目的地,將資料傳送至這些帳戶。
直接存取情境
如要將資料傳送至 Google Ads 帳戶,且您的憑證適用於 Google 帳戶,而該帳戶是 Google Ads 帳戶的使用者:
擷取
| 目的地 | |||||
|---|---|---|---|---|---|
operating_account |
|
||||
login_account |
請勿設定 login_account,或將其設為與 operating_account 相同的值。 |
||||
linked_account |
請勿設定 linked_account 欄位。 |
||||
product_destination_id |
目標對象或轉換動作的 ID。 | ||||
資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/GOOGLE_ADS/accounts/GOOGLE_ADS_CUSTOMER_ID |
linked-account |
請勿設定 linked-account 標頭。 |
以下是直接存取情境的範例,使用圖表中的帳戶和 Google 帳戶 jeffersonloveshiking@gmail.com 的憑證:
擷取
{
"destinations": [
{
"operatingAccount": {
"accountId": "C1_CUSTOMER_ID",
"accountType": "GOOGLE_ADS"
},
"loginAccount": {
"accountId": "C1_CUSTOMER_ID",
"accountType": "GOOGLE_ADS"
},
"productDestinationId": "USER_LIST_ID"
}
]
}資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/GOOGLE_ADS/accounts/C1_CUSTOMER_ID |
linked-account |
請勿設定 linked-account 標頭。 |
管理員存取權情境
如要將資料傳送至 Google Ads 帳戶,而您的憑證是 Google Ads 管理員帳戶中某個使用者的 Google 帳戶,且廣告主帳戶是子帳戶:
擷取
| 目的地 | |||||
|---|---|---|---|---|---|
operating_account |
|
||||
login_account |
|
||||
linked_account |
請勿設定 linked_account 欄位。 |
||||
product_destination_id |
目標對象或轉換動作的 ID。 | ||||
資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/GOOGLE_ADS/accounts/MANAGER_CUSTOMER_ID |
linked-account |
請勿設定 linked-account 標頭。 |
以下是 Google Ads 客戶帳戶 C2 的管理員存取權情境範例,取自圖表和 Google 帳戶baklavainthebalkans@gmail.com的憑證:
擷取
{
"destinations": [
{
"operatingAccount": {
"accountId": "C2_CUSTOMER_ID",
"accountType": "GOOGLE_ADS"
},
"loginAccount": {
"accountId": "M2_CUSTOMER_ID",
"accountType": "GOOGLE_ADS"
},
"productDestinationId": "USER_LIST_ID"
}
]
}資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/GOOGLE_ADS/accounts/M2_CUSTOMER_ID |
linked-account |
請勿設定 linked-account 標頭。 |
以下是另一個範例,說明 Google Ads 客戶帳戶 C2 的管理員存取權情境,以及 Google 帳戶 cloudysanfrancisco@gmail.com 的憑證,該帳戶是 Google Ads 管理員帳戶 M1 的使用者:
擷取
{
"destinations": [
{
"operatingAccount": {
"accountId": "C2_CUSTOMER_ID",
"accountType": "GOOGLE_ADS"
},
"loginAccount": {
"accountId": "M1_CUSTOMER_ID",
"accountType": "GOOGLE_ADS"
},
"productDestinationId": "USER_LIST_ID"
}
]
}資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/GOOGLE_ADS/accounts/M1_CUSTOMER_ID |
linked-account |
請勿設定 linked-account 標頭。 |
Display & Video 360
您可以透過兩種方式將資料傳送至 Display & Video 360:
- 直接存取:憑證適用於 Display & Video 360 廣告主或合作夥伴帳戶中的使用者 Google 帳戶。
- Display & Video 360 夥伴存取權,其中憑證適用於 Google 帳戶,該帳戶是 Display & Video 360 夥伴帳戶中的使用者,而作業帳戶是夥伴帳戶下的 Display & Video 360 廣告主帳戶。
直接存取情境
如要將資料傳送至 Display & Video 360 廣告主帳戶,且您的憑證適用於廣告主帳戶中的使用者 Google 帳戶:
擷取
| 目的地 | |||||
|---|---|---|---|---|---|
operating_account |
|
||||
login_account |
請勿設定 login_account,或將其設為與 operating_account 相同的值。 |
||||
linked_account |
請勿設定 linked_account 欄位。 |
||||
product_destination_id |
目標對象的 ID。 | ||||
資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/DISPLAY_VIDEO_ADVERTISER/accounts/DISPLAY_VIDEO_ADVERTISER_ID |
linked-account |
請勿設定 linked-account 標頭。 |
以下是Destination的範例,說明如何直接存取資料,並將資料傳送至 Display & Video 360 廣告主:
擷取
{
"destinations": [
{
"operatingAccount": {
"accountId": "DISPLAY_VIDEO_ADVERTISER_ID",
"accountType": "DISPLAY_VIDEO_ADVERTISER"
},
"loginAccount": {
"accountId": "DISPLAY_VIDEO_ADVERTISER_ID",
"accountType": "DISPLAY_VIDEO_ADVERTISER"
},
"productDestinationId": "AUDIENCE_ID"
}
]
}資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/DISPLAY_VIDEO_ADVERTISER/accounts/DISPLAY_VIDEO_ADVERTISER_ID |
linked-account |
請勿設定 linked-account 標頭。 |
同樣地,如要將資料傳送至 Display & Video 360 夥伴帳戶,且您的憑證適用於夥伴帳戶中的使用者 Google 帳戶:
擷取
| 目的地 | |||||
|---|---|---|---|---|---|
operating_account |
|
||||
login_account |
請勿設定 login_account,或將其設為與 operating_account 相同的值。 |
||||
linked_account |
請勿設定 linked_account 欄位。 |
||||
product_destination_id |
目標對象的 ID。 | ||||
資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/DISPLAY_VIDEO_PARTNER/accounts/DISPLAY_VIDEO_PARTNER_ID |
linked-account |
請勿設定 linked-account 標頭。 |
以下是Destination的範例,說明如何直接存取資料,並將資料傳送至 Display & Video 360 合作夥伴:
擷取
{
"destinations": [
{
"operatingAccount": {
"accountId": "DISPLAY_VIDEO_PARTNER_ID",
"accountType": "DISPLAY_VIDEO_PARTNER"
},
"loginAccount": {
"accountId": "DISPLAY_VIDEO_PARTNER_ID",
"accountType": "DISPLAY_VIDEO_PARTNER"
},
"productDestinationId": "AUDIENCE_ID"
}
]
}資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/DISPLAY_VIDEO_PARTNER/accounts/DISPLAY_VIDEO_PARTNER_ID |
linked-account |
請勿設定 linked-account 標頭。 |
Display & Video 360 合作夥伴存取權情境
如要將資料傳送至 Display & Video 360 廣告主,且您的憑證適用於 Google 帳戶,而該帳戶是廣告主上層 Display & Video 360 合作夥伴帳戶的使用者:
擷取
| 目的地 | |||||
|---|---|---|---|---|---|
operating_account |
|
||||
login_account |
|
||||
linked_account |
請勿設定 linked_account 欄位。 |
||||
product_destination_id |
目標對象的 ID。 | ||||
資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/DISPLAY_VIDEO_PARTNER/accounts/DISPLAY_VIDEO_PARTNER_ID |
linked-account |
請勿設定 linked-account 標頭。 |
以下是夥伴存取情境的 Destination 範例,可將資料傳送至 Display & Video 360 廣告主。在這種情況下,憑證必須是 Google 帳戶的憑證,且該帳戶是 Display & Video 360 合作夥伴帳戶 DISPLAY_VIDEO_PARTNER_ID 的使用者,而 Display & Video 360 廣告主帳戶 DISPLAY_VIDEO_ADVERTISER_ID 必須是合作夥伴帳戶 DISPLAY_VIDEO_PARTNER_ID 的子項。
擷取
{
"destinations": [
{
"operatingAccount": {
"accountId": "DISPLAY_VIDEO_ADVERTISER_ID",
"accountType": "DISPLAY_VIDEO_ADVERTISER"
},
"loginAccount": {
"accountId": "DISPLAY_VIDEO_PARTNER_ID",
"accountType": "DISPLAY_VIDEO_PARTNER"
},
"productDestinationId": "AUDIENCE_ID"
}
]
}資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/DISPLAY_VIDEO_PARTNER/accounts/DISPLAY_VIDEO_PARTNER_ID |
linked-account |
請勿設定 linked-account 標頭。 |
Google Analytics
附註:如果 operating_account 是 Google Analytics 帳戶,請勿設定 login_account,或將 login_account 設為與 operating_account 相同的值。否則要求會失敗,並顯示 OPERATING_ACCOUNT_LOGIN_ACCOUNT_MISMATCH 錯誤。
擷取
| 目的地 | |||||
|---|---|---|---|---|---|
operating_account |
|
||||
login_account |
請勿設定 login_account,或將其設為與 operating_account 相同的值。 |
||||
linked_account |
請勿設定 linked_account 欄位。 |
||||
product_destination_id |
|
||||
資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/GOOGLE_ANALYTICS_PROPERTY/accounts/PROPERTY_ID |
linked-account |
請勿設定 linked-account 標頭。 |
以下是Destination的範例,說明如何將事件傳送至 Google Analytics:
擷取
{
"destinations": [
{
"operatingAccount": {
"accountId": "PROPERTY_ID",
"accountType": "GOOGLE_ANALYTICS_PROPERTY"
},
"loginAccount": {
"accountId": "PROPERTY_ID",
"accountType": "GOOGLE_ANALYTICS_PROPERTY"
},
"productDestinationId": "MEASUREMENT_ID"
}
]
}資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/GOOGLE_ANALYTICS_PROPERTY/accounts/PROPERTY_ID |
linked-account |
請勿設定 linked-account 標頭。 |
泛光燈
擷取
| 目的地 | |||||
|---|---|---|---|---|---|
operating_account |
|
||||
login_account |
請勿設定 login_account,或將其設為與 operating_account 相同的值。 |
||||
linked_account |
請勿設定 linked_account 欄位。 |
||||
product_destination_id |
Floodlight 活動 ID | ||||
以下是將事件傳送至 Floodlight 的 Destination 範例:
擷取
{
"destinations": [
{
"operatingAccount": {
"accountId": "FLOODLIGHT_CONFIG_ID",
"accountType": "FLOODLIGHT_CONFIG"
},
"loginAccount": {
"accountId": "FLOODLIGHT_CONFIG_ID",
"accountType": "FLOODLIGHT_CONFIG"
},
"productDestinationId": "FLOODLIGHT_ACTIVITY_ID"
}
]
}
資料合作夥伴情境
以下說明如何為資料合作夥伴設定 Destination,以因應常見情境,將資料傳送至與資料合作夥伴帳戶建立合作夥伴連結的廣告主帳戶。
這張圖表說明 Data Manager API 如何使用憑證和 Destination 欄位,透過合作夥伴連結存取廣告主帳戶。
Google Ads
下圖顯示一組 Google Ads 和資料合作夥伴帳戶的範例。這張圖表也會顯示每個 Google Ads 或資料合作夥伴帳戶中的使用者所屬的 Google 帳戶,以及帳戶之間的合作夥伴連結。
- 資料合作夥伴 D1
D1 和 Google Ads 管理員帳戶 M2 之間存在合作夥伴連結。
Google 帳戶
222larabrown@gmail.com是 D1 的使用者。- 資料合作夥伴 D2
D2 和 Google Ads 客戶帳戶 C1 之間存在合作夥伴連結。
Google 帳戶「
jeffersonloveshiking@gmail.com」是 D2 的使用者。- 管理員帳戶 M1
M1 有兩個直接子帳戶:
- 管理員帳戶 M2
- 客戶帳戶 C1
- 管理員帳戶 M2
M2 有兩個直接子帳戶:
- 客戶帳戶 C1
- 客戶帳戶 C2
- 客戶帳戶 C1
C1 有兩個直屬上層管理員帳戶:
- 管理員帳戶 M1
- 管理員帳戶 M2
- 客戶帳戶 C2
管理員帳戶 M2 是 C2 的唯一直接上層。
這組帳戶的用途如下:
- 扮演資料合作夥伴 D1
如要擔任資料合作夥伴 D1,請使用 Google 帳戶
222larabrown@gmail.com的憑證,透過目的地將資料傳送至管理員帳戶 M2、客戶帳戶 C1 或客戶帳戶 C2,並將login_account設為資料合作夥伴帳戶 D1,以及將linked_account設為管理員帳戶 M2。資料合作夥伴 D1 無法將資料傳送至管理員帳戶 M1,因為 D1 和 M1 之間沒有合作夥伴連結。
- 扮演資料合作夥伴 D2
如要擔任資料合作夥伴 D2,請使用 Google 帳戶的憑證
jeffersonloveshiking@gmail.com,透過目的地將資料傳送至客戶帳戶 C1,並將login_account設為資料合作夥伴帳戶 D2,以及將linked_account設為客戶帳戶 C1。資料合作夥伴 D2 無法將資料傳送至管理員帳戶 M1、管理員帳戶 M2 或客戶帳戶 C2,因為 D2 與這些帳戶或其上層管理員帳戶之間沒有合作夥伴連結。
資料合作夥伴 D1 和 D2 的主要差異在於資料合作夥伴與 Google Ads 帳戶的連結方式。
- 資料合作夥伴 D1 已連結至 Google Ads 管理員帳戶。這是管理員合作夥伴連結情境的範例。
- 資料合作夥伴 D2 已連結至 Google Ads 客戶帳戶。這是直接合作夥伴連結情境的範例。
直接合作夥伴連結情境
如要將資料傳送至 Google Ads 帳戶,且 Google Ads 帳戶與資料合作夥伴帳戶之間有合作夥伴連結:
擷取
| 目的地 | |||||
|---|---|---|---|---|---|
operating_account |
|
||||
login_account |
|
||||
linked_account |
請勿設定 linked_account 欄位。 |
||||
product_destination_id |
目標對象或轉換動作的 ID。 | ||||
資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/DATA_PARTNER/accounts/DATA_PARTNER_ID |
linked-account |
請勿設定 linked-account 標頭。 |
以下是直接合作夥伴連結情境的範例,使用圖表中的帳戶,以及資源管理要求的對應要求標頭。在這種情況下,資料合作夥伴 D2 會使用 D2 和 C1 之間的合作夥伴連結,以及 Google 帳戶 jeffersonloveshiking@gmail.com 的憑證,將目標對象成員資料傳送給 Google Ads 用戶端客戶 C1:
擷取
{
"destinations": [
{
"operatingAccount": {
"accountId": "C1_CUSTOMER_ID",
"accountType": "GOOGLE_ADS"
},
"loginAccount": {
"accountId": "D2_CUSTOMER_ID",
"accountType": "DATA_PARTNER"
},
"productDestinationId": "USER_LIST_ID"
}
]
}資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/DATA_PARTNER/accounts/D2_CUSTOMER_ID |
linked-account |
請勿設定 linked-account 標頭。 |
管理員合作夥伴連結情境
如要將資料傳送至 Google Ads 帳戶,且合作夥伴連結位於父項 Google Ads 管理員帳戶和資料合作夥伴帳戶之間:
擷取
| 目的地 | |||||
|---|---|---|---|---|---|
operating_account |
|
||||
login_account |
|
||||
linked_account |
|
||||
product_destination_id |
目標對象或轉換動作的 ID。 | ||||
資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/DATA_PARTNER/accounts/DATA_PARTNER_ID |
linked-account |
accountTypes/GOOGLE_ADS/accounts/MANAGER_CUSTOMER_ID |
以下是使用圖表中帳戶的管理員合作夥伴連結情境範例。在這個情境中,資料合作夥伴 D1 會透過 D1 和 M2 之間的合作夥伴連結,以及 Google 帳戶 222larabrown@gmail.com 的憑證,將目標對象成員資料傳送給 Google Ads 客戶 C2:
擷取
{
"destinations": [
{
"operatingAccount": {
"accountId": "C2_CUSTOMER_ID",
"accountType": "GOOGLE_ADS"
},
"loginAccount": {
"accountId": "D1_CUSTOMER_ID",
"accountType": "DATA_PARTNER"
},
"linkedAccount": {
"accountId": "M2_CUSTOMER_ID",
"accountType": "GOOGLE_ADS"
},
"productDestinationId": "USER_LIST_ID"
}
]
}資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/DATA_PARTNER/accounts/D1_CUSTOMER_ID |
linked-account |
accountTypes/GOOGLE_ADS/accounts/M2_CUSTOMER_ID |
Display & Video 360
資料合作夥伴可以透過兩種方式,將資料傳送至 Display & Video 360 帳戶:
- 在資料合作夥伴帳戶與 Display & Video 360 夥伴或廣告主帳戶之間,使用直接夥伴連結。
- 使用資料合作夥伴帳戶與廣告主的上層 Display & Video 360 合作夥伴帳戶之間的合作夥伴連結,將資料傳送給 Display & Video 360 廣告主。
直接合作夥伴連結情境
如要將資料傳送至 Display & Video 360 廣告主,且 Display & Video 360 廣告主帳戶與資料合作夥伴帳戶之間有合作夥伴連結:
擷取
| 目的地 | |||||
|---|---|---|---|---|---|
operating_account |
|
||||
login_account |
|
||||
linked_account |
請勿設定 linked_account 欄位。 |
||||
product_destination_id |
目標對象或轉換動作的 ID。 | ||||
資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/DATA_PARTNER/accounts/DATA_PARTNER_ID |
linked-account |
請勿設定 linked-account 標頭。 |
以下是Destination的範例,說明如何為直接合作夥伴連結情境傳送資料給 Display & Video 360 廣告主,以及資源管理要求的對應要求標頭:
擷取
{
"destinations": [
{
"operatingAccount": {
"accountId": "DISPLAY_VIDEO_ADVERTISER_ID",
"accountType": "DISPLAY_VIDEO_ADVERTISER"
},
"loginAccount": {
"accountId": "DATA_PARTNER_ID",
"accountType": "DATA_PARTNER"
},
"productDestinationId": "AUDIENCE_ID"
}
]
}資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/DATA_PARTNER/accounts/DATA_PARTNER_ID |
linked-account |
請勿設定 linked-account 標頭。 |
如要將資料傳送至 Display & Video 360 合作夥伴帳戶,您必須在 Display & Video 360 合作夥伴帳戶與資料合作夥伴帳戶之間建立合作夥伴連結。
擷取
| 目的地 | |||||
|---|---|---|---|---|---|
operating_account |
|
||||
login_account |
|
||||
linked_account |
請勿設定 linked_account 欄位。 |
||||
product_destination_id |
目標對象或轉換動作的 ID。 | ||||
資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/DATA_PARTNER/accounts/DATA_PARTNER_ID |
linked-account |
請勿設定 linked-account 標頭。 |
以下是直接合作夥伴連結情境的 Destination 範例,可將資料傳送至 Display & Video 360 合作夥伴,以及資源管理要求的對應要求標頭:
擷取
{
"destinations": [
{
"operatingAccount": {
"accountId": "DISPLAY_VIDEO_PARTNER_ID",
"accountType": "DISPLAY_VIDEO_PARTNER"
},
"loginAccount": {
"accountId": "DATA_PARTNER_ID",
"accountType": "DATA_PARTNER"
},
"productDestinationId": "AUDIENCE_ID"
}
]
}資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/DATA_PARTNER/accounts/DATA_PARTNER_ID |
linked-account |
請勿設定 linked-account 標頭。 |
父項合作夥伴連結情境
如要將資料傳送至 Display & Video 360 廣告主,且與資料合作夥伴帳戶的合作夥伴連結是 Display & Video 360 合作夥伴帳戶,而廣告主帳戶是子項帳戶:
擷取
| 目的地 | |||||
|---|---|---|---|---|---|
operating_account |
|
||||
login_account |
|
||||
linked_account |
|
||||
product_destination_id |
目標對象或轉換動作的 ID。 | ||||
資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/DATA_PARTNER/accounts/DATA_PARTNER_ID |
linked-account |
accountTypes/DISPLAY_VIDEO_PARTNER/accounts/DISPLAY_VIDEO_PARTNER_ID |
以下是Destination的範例,說明如何透過資料合作夥伴與廣告主上層 Display & Video 360 夥伴之間的夥伴連結,將資料傳送給 Display & Video 360 廣告主:
擷取
{
"destinations": [
{
"operatingAccount": {
"accountId": "DISPLAY_VIDEO_ADVERTISER_ID",
"accountType": "DISPLAY_VIDEO_ADVERTISER"
},
"loginAccount": {
"accountId": "DATA_PARTNER_ID",
"accountType": "DATA_PARTNER"
},
"linkedAccount": {
"accountId": "DISPLAY_VIDEO_PARTNER_ID",
"accountType": "DISPLAY_VIDEO_PARTNER"
},
"productDestinationId": "AUDIENCE_ID"
}
]
}資源管理
| 要求標頭 | |
|---|---|
login-account |
accountTypes/DATA_PARTNER/accounts/DATA_PARTNER_ID |
linked-account |
accountTypes/DISPLAY_VIDEO_PARTNER/accounts/DISPLAY_VIDEO_PARTNER_ID |
Google Analytics
Data Manager API 不支援使用合作夥伴連結將資料傳送至 Google Analytics 帳戶。請改用 Google Analytics 的廣告主情境方法。
泛光燈
Data Manager API 不支援使用合作夥伴連結將資料傳送至 Floodlight 設定。請改用廣告主 Floodlight 情境方法。
詳細規定
本節詳細說明 IngestionService 要求的 Destination 帳戶欄位規定、資源管理要求的對等要求標頭、設定 product_destination_id 的提示,以及如何判斷憑證的存取權位置。
帳戶欄位
一個 Destination 最多可有 3 個不同帳戶:
operating_accountoperating_account為必填欄位。operating_account會指出要求中的資料接收帳戶。operating_account可以是下列任一值:- Google Ads 帳戶
- Display & Video 360 廣告主帳戶
- Display & Video 360 合作夥伴帳戶
- Google Analytics 資源
- 如要將資料傳送至資料合作夥伴帳戶擁有的目標對象,請使用資料合作夥伴帳戶。
沒有對應至
Destinationoperating_account欄位的要求標頭。傳送資源管理要求時,要求目標帳戶為作業帳戶。login_account欄位和login-account要求標頭login_account不一定需要,預設為IngestionService要求中的operating_account,以及資源管理要求中的目標帳戶。在資源管理要求中,使用login-account要求標頭識別登入帳戶。Data Manager API 會驗證下列事項:
憑證的 Google 帳戶是登入帳戶中的使用者。
登入帳戶為下列其中之一:
與
operating_account相同。如果您未在IngestionService要求中設定Destination的login_account,或未在資源管理要求中設定login-account標頭,系統就會預設使用這個值。Google Ads 管理員或Display & Video 360 合作夥伴帳戶,是
operating_account在IngestionService要求中的上層,或是資源管理要求中目標帳戶的上層。資料合作夥伴帳戶,其中包含指向
IngestionService要求中linked_account的合作夥伴連結,或是資源管理要求中的linked-account標頭。
linked_account欄位和linked-account要求標頭-
linked_account表示哪個帳戶與login_account有合作夥伴連結,或是資源管理要求的目標帳戶。IngestionService
產品目的地 ID
Destination 的 product_destination_id 會識別 operating_account 中接收資料的物件。舉例來說,這可能是 Google Ads 或 Display & Video 360 的目標對象 ID、Google Ads 的轉換動作 ID,或是 Google Analytics 資料串流的評估 ID。
以下說明如何找出各類型產品目的地 ID。
Google Ads 目標對象
如要匯入目標對象成員,產品目的地 ID 就是目標對象 ID。 使用 Google Ads 使用者介面或 Data Manager API 擷取這個 ID。
Google Ads 使用者介面
如要透過 Google Ads 使用者介面取得目標對象 ID,請按照下列步驟操作:
- 前往 Google Ads 使用者介面中的「目標對象管理工具」。
- 按一下目標對象名稱即可查看詳細資料。
- 目標對象 ID 會列在「名單 ID」旁邊。
Data Manager API
Google Ads 事件
如要擷取事件,產品目的地 ID 就是轉換動作 ID。
如要透過 Google Ads 使用者介面取得轉換動作 ID,請按照下列步驟操作:
- 前往 Google Ads 使用者介面的「轉換」。
- 按一下轉換動作名稱即可查看詳細資料。
轉換動作 ID 是名為
ctId的網址查詢參數值。https://ads.google.com/aw/conversions/detail?ocid=...&ctId=CONVERSION_ACTION_ID&...
如要透過 Google Ads API 取得轉換動作 ID,請按照下列步驟操作:
將
Search或SearchStream要求傳送至GoogleAdsService,並附上下列查詢:SELECT conversion_action.id, conversion_action.name FROM conversion_action WHERE conversion_action.name = 'CONVERSION_ACTION_NAME'從回應中
conversion_action的id欄位取得轉換動作 ID。[ { "results": [ { "conversionAction": { "resourceName": "customers/CUSTOMER_ID/conversionActions/CONVERSION_ACTION_ID", "id": "CONVERSION_ACTION_ID", "name": "CONVERSION_ACTION_NAME" } } ] } ]
Display & Video 360 目標對象
如要匯入目標對象成員,產品目的地 ID 就是目標對象 ID。 使用 Display & Video 360 使用者介面或 Data Manager API 擷取這個 ID。
Display & Video 360 使用者介面
如要從 Display & Video 360 使用者介面取得目標對象 ID,請按照下列步驟操作:
- 前往 https://displayvideo.google.com 登入 Display & Video 360 使用者介面。
- 前往您用於
operating_account的 Display & Video 360 夥伴或廣告主。 - 前往左選單中的「目標對象」,然後選取「所有目標對象」。
- 在清單中找出目標對象。目標對象 ID 是「名稱」欄中名稱旁邊的數字。
Data Manager API
Google Analytics 事件
產品目的地 ID 取決於資料串流類型。
- 網站資料串流
- 使用資料串流的評估 ID。
- 應用程式資料串流
使用資料串流的 Firebase 應用程式 ID。以下提供兩種方法,可找出 Firebase 應用程式 ID:
- 在 Google Analytics 使用者介面中,前往「資料串流」,按一下資料串流,然後找出「FIREBASE 應用程式 ID」。
- 使用 Firebase 控制台。
Floodlight 事件
如要將事件匯入 Floodlight,產品目的地 ID 就是 Floodlight 活動 ID。您可以使用 Campaign Manager 360 使用者介面或 Campaign Manager 360 API 擷取這個 ID。
Campaign Manager 360 使用者介面
如要透過 Campaign Manager 360 使用者介面取得 Floodlight 活動 ID,請按照下列步驟操作:
- 登入 Campaign Manager 360 使用者介面。
- 前往您用於
operating_account的 Campaign Manager 360 廣告主。 - 前往左選單的「Floodlight」,然後選取「活動」。
- 在清單中找出 Floodlight 活動。ID 是「活動名稱」欄中名稱旁邊的數字。
Campaign Manager 360 API
如要透過 Campaign Manager 360 API 取得 Floodlight 活動 ID,請按照下列步驟操作:
- 將
list要求傳送至floodlightActivities資源。 - 指定 Floodlight 設定的
floodlightConfigurationId。 - 您可以選擇使用
searchString參數,依活動名稱篩選。 - 從回應中選取的
FloodlightActivity的id欄位取得 Floodlight 活動 ID。
判斷憑證的存取權位置
您用來授權 Data Manager API 要求的憑證,會與特定 Google 帳戶建立關聯。
- 如果您使用使用者憑證,系統會將要求授權為使用者 Google 帳戶,而該使用者在產生憑證時,已授權您代表他們執行動作。
- 如果您使用服務帳戶憑證,系統會將要求授權為服務帳戶的 Google 帳戶。
以下說明如何確認您用來驗證的 Google 帳戶是否能存取 Google Ads、Display & Video 360、Google Analytics 或 Campaign Manager 360 帳戶。
Google Ads 或資料合作夥伴
- 前往 Google Ads 使用者介面中的「存取權和安全性」
login_account。 - 選取 [Users] (使用者) 分頁標籤。
- 如果
login_account是 Google Ads 管理員帳戶,請關閉「以完整階層顯示使用者」切換按鈕,隱藏子帳戶的使用者。 - 確認憑證的 Google 帳戶位於「使用者」分頁中顯示的帳戶清單。
Display & Video 360
Google Analytics
- 前往 Google Analytics 使用者介面的「資源存取管理」。
- 確認已選取
login_account中指定的 Google Analytics 資源。 - 確認憑證的 Google 帳戶是否具備資源的「編輯者」或「管理員」角色。
Floodlight (Campaign Manager 360)
- 登入 Campaign Manager 360 使用者介面。
- 依序前往左選單中的「管理」 >「使用者設定檔」。
- 確認憑證的 Google 帳戶位於顯示的設定檔清單中。
- 按一下設定檔,確認該設定檔有權存取用做
login_account的廣告主帳戶。如果未在要求中設定login_account,系統會預設為operating_account。請確認帳戶具備「插入離線轉換」權限的使用者角色。