設定目的地和標頭

使用 Data Manager API 時,Destination 概念和要求標頭經常出現。請參閱本指南,瞭解如何針對不同情境設定目的地和標頭。

使用目的地或標頭的時機

  • 在擷取要求中使用 Destination。擷取要求會使用 IngestionService,在目標對象中新增或移除成員,或傳送事件。IngestAudienceMembersRequest 或 IngestEventsRequest 中的 destinations 清單定義了:

    1. 接收資料的帳戶。例如 Google Ads 帳戶或 Google Analytics 資源。
    2. 帳戶內資料的目的地實體,例如 Google Ads 廣告轉換動作或 Google Analytics 串流。
    3. 要求憑證對接收資料帳戶的存取路徑。

    您可以在同一項攝入要求中加入多個目的地。

  • 在建立、更新、刪除或擷取資源的資源管理要求中使用要求標頭。標頭會定義要求憑證的存取路徑,指向資源管理要求的目標帳戶。以下是支援要求標頭的資源管理方法清單:

舉例來說,如果您想建立目標對象、將成員加入目標對象、查看診斷資料,然後擷取目標對象以查看其大小,以下是每個步驟、要使用的要求類型,以及是否應使用目的地或要求標頭:

步驟 要求類型 目的地或要求標頭
建立目標對象 資源管理 要求標頭
新增目標對象成員 擷取 目的地
查看診斷資訊 擷取 目的地
擷取目標對象 資源管理 要求標頭

如要切換查看本指南中各要求類型的詳細資料,請按一下每個表格周圍的「Ingestion」或「Resource management」分頁標籤。

如果您是廣告主或代理商,請跳至廣告主情境,查看如何設定標頭和建構 Destination 的範例:

如果您是資料合作夥伴,請跳至資料合作夥伴情境,查看如何設定標頭和建構 Destination,以便管理資源,並將資料傳送至與資料合作夥伴帳戶有合作夥伴連結的帳戶:

「詳細規定」一節會深入說明規定和驗證規則。

廣告主狀態

以下說明如何為廣告主和代理商的常見情境,設定 Destination 或要求標頭。這張圖表顯示 Data Manager API 如何使用憑證和 Destination 欄位存取廣告主帳戶。

廣告主存取路徑

Google Ads

下圖顯示一組 Google Ads 帳戶和使用者的範例。

Google Ads 帳戶和使用者

管理員帳戶 M1

M1 有兩個直接子帳戶:

  1. 管理員帳戶 M2
  2. 客戶帳戶 C1

Google 帳戶 cloudysanfrancisco@gmail.com 是 M1 的使用者。

管理員帳戶 M2

M2 有兩個直接子帳戶:

  1. 客戶帳戶 C1
  2. 客戶帳戶 C2

Google 帳戶 baklavainthebalkans@gmail.com 是 M2 的使用者。

客戶帳戶 C1

C1 有兩個直屬上層管理員帳戶:

  1. 管理員帳戶 M1
  2. 管理員帳戶 M2

Google 帳戶 jeffersonloveshiking@gmail.com 是 C1 的使用者。

客戶帳戶 C2

管理員帳戶 M2 是 C2 的唯一直接上層帳戶。

列出的 Google 帳戶都不是 C2 的使用者。

直接存取情境和管理員存取情境說明如何設定目的地,將資料傳送至這些帳戶。

直接存取情境

如要將資料傳送至 Google Ads 帳戶,且您的憑證屬於 Google Ads 帳戶使用者的 Google 帳戶:

擷取
目的地
operating_account
account_id Google Ads 帳戶的客戶 ID
account_type GOOGLE_ADS
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 帳戶,而該帳戶是 Google Ads 管理員帳戶中的使用者,且廣告主帳戶是子帳戶:

擷取
目的地
operating_account
account_id Google Ads 客戶帳戶的客戶 ID
account_type GOOGLE_ADS
login_account
account_id Google Ads 管理員帳戶的客戶 ID
account_type GOOGLE_ADS
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:

  1. 直接存取:憑證屬於 Google 帳戶,該帳戶是 Display & Video 360 廣告主或夥伴帳戶中的使用者。
  2. Display & Video 360 夥伴存取權:憑證屬於 Display & Video 360 夥伴帳戶中的 Google 帳戶使用者,而操作帳戶是夥伴帳戶下的 Display & Video 360 廣告主帳戶。

直接存取情境

如要將資料傳送至 Display & Video 360 廣告主帳戶,且您的憑證屬於廣告主帳戶中的 Google 帳戶使用者:

擷取
目的地
operating_account
account_id Display & Video 360 廣告主帳戶 ID
account_type DISPLAY_VIDEO_ADVERTISER
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
account_id Display & Video 360 夥伴帳戶 ID
account_type DISPLAY_VIDEO_PARTNER
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 廣告主,且憑證屬於廣告主上層 Display & Video 360 夥伴帳戶中的 Google 帳戶使用者:

擷取
目的地
operating_account
account_id Display & Video 360 廣告主帳戶 ID
account_type DISPLAY_VIDEO_ADVERTISER
login_account
account_id Display & Video 360 夥伴帳戶 ID
account_type DISPLAY_VIDEO_PARTNER
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 廣告主。在這種情況下,憑證必須屬於 Display & Video 360 合作夥伴帳戶 DISPLAY_VIDEO_PARTNER_ID 的使用者 Google 帳戶,且 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,或將其設為與 operating_account 相同的值。否則,要求會失敗,並顯示錯誤 OPERATING_ACCOUNT_LOGIN_ACCOUNT_MISMATCH。

擷取
目的地
operating_account
account_id Google Analytics 資源 ID
account_type GOOGLE_ANALYTICS_PROPERTY
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 標頭。

以下是將事件傳送至 Google Analytics 的 Destination 範例:

擷取
{
  "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
account_id Floodlight 設定 ID
如果您的廣告主是上層廣告主的子項,請使用 Campaign Manager 360 中的上層廣告主 ID 做為 Floodlight 設定 ID。否則,請使用廣告主的 ID。 瞭解如何在 Campaign Manager 360 使用者介面中查看廣告主 ID。
account_type FLOODLIGHT_CONFIG
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 帳戶是使用者,以及帳戶之間的合作夥伴連結。

資料合作夥伴和 Google Ads 帳戶與使用者

資料合作夥伴 D1

D1 和 Google Ads 管理員帳戶 M2 之間有合作夥伴連結。

Google 帳戶 222larabrown@gmail.com 是 D1 的使用者。

資料合作夥伴 D2

D2 和 Google Ads 客戶帳戶 C1 之間有合作夥伴連結。

Google 帳戶 jeffersonloveshiking@gmail.com 是 D2 的使用者。

管理員帳戶 M1

M1 有兩個直接子帳戶:

  1. 管理員帳戶 M2
  2. 客戶帳戶 C1
管理員帳戶 M2

M2 有兩個直接子帳戶:

  1. 客戶帳戶 C1
  2. 客戶帳戶 C2
客戶帳戶 C1

C1 有兩個直屬上層管理員帳戶:

  1. 管理員帳戶 M1
  2. 管理員帳戶 M2
客戶帳戶 C2

管理員帳戶 M2 是 C2 的唯一直接上層帳戶。

這組帳戶可執行的操作如下:

以資料合作夥伴 D1 的身分操作

如要以資料合作夥伴 D1 的身分執行操作,請使用 Google 帳戶 222larabrown@gmail.com 的憑證執行下列操作:

  • 使用目的地將資料傳送至客戶帳戶 C1 或客戶帳戶 C2,其中 login_account 設為資料合作夥伴帳戶 D1,linked_account 設為管理員帳戶 M2。

  • 使用 login_account 設為資料合作夥伴帳戶 D1 的目的地,直接將資料傳送至管理員帳戶 M2。不要設定 linked_account。

資料合作夥伴 D1 無法將資料傳送至管理員帳戶 M1,因為 D1 和 M1 之間沒有合作夥伴連結。

以資料合作夥伴 D2 的身分操作

如要以資料合作夥伴 D2 的身分,使用 Google 帳戶 jeffersonloveshiking@gmail.com 的憑證將資料傳送至客戶帳戶 C1,請使用 login_account 設為資料合作夥伴帳戶 D2 的目的地。不要設定 linked_account。

資料合作夥伴 D2 無法將資料傳送至管理員帳戶 M1、管理員帳戶 M2 或客戶帳戶 C2,因為 D2 與這些帳戶或其上層管理員帳戶之間沒有合作夥伴連結。

資料合作夥伴 D1 和 D2 的主要差異,在於資料合作夥伴與 Google Ads 帳戶的連結方式。

直接合作夥伴連結情境

如要將資料傳送至 Google Ads 帳戶,且 Google Ads 帳戶與資料合作夥伴帳戶之間有合作夥伴連結:

擷取
目的地
operating_account
account_id Google Ads 帳戶的客戶 ID
account_type GOOGLE_ADS
login_account
account_id 資料合作夥伴帳戶的客戶 ID
account_type DATA_PARTNER
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
account_id Google Ads 客戶帳戶的客戶 ID
account_type GOOGLE_ADS
login_account
account_id 資料合作夥伴帳戶的客戶 ID
account_type DATA_PARTNER
linked_account
account_id Google Ads 管理員帳戶的客戶 ID
account_type GOOGLE_ADS
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 帳戶:

  1. 在資料合作夥伴帳戶與 Display & Video 360 夥伴或廣告主帳戶之間,使用直接夥伴連結。
  2. 使用資料合作夥伴帳戶和廣告主上層 Display & Video 360 合作夥伴帳戶之間的合作夥伴連結,將資料傳送至 Display & Video 360 廣告主。

如要將資料傳送至 Display & Video 360 廣告主,且夥伴連結位於 Display & Video 360 廣告主帳戶和資料合作夥伴帳戶之間:

擷取
目的地
operating_account
account_id Display & Video 360 廣告主帳戶 ID
account_type DISPLAY_VIDEO_ADVERTISER
login_account
account_id 資料合作夥伴帳戶的客戶 ID
account_type DATA_PARTNER
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
account_id Display & Video 360 夥伴帳戶 ID
account_type DISPLAY_VIDEO_PARTNER
login_account
account_id 資料合作夥伴帳戶的客戶 ID
account_type DATA_PARTNER
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
account_id Display & Video 360 廣告主帳戶 ID
account_type DISPLAY_VIDEO_ADVERTISER
login_account
account_id 資料合作夥伴帳戶的客戶 ID
account_type DATA_PARTNER
linked_account
account_id Display & Video 360 夥伴帳戶 ID
account_type DISPLAY_VIDEO_PARTNER
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 Ad Manager

如要將資料傳送至 Google Ad Manager 帳戶,且資料合作夥伴帳戶與 Google Ad Manager 帳戶之間有合作夥伴連結:

擷取
目的地
operating_account
account_id Google Ad Manager 帳戶的目標對象連結 ID
account_type GOOGLE_AD_MANAGER_AUDIENCE_LINK
login_account
account_id 資料合作夥伴帳戶的客戶 ID
account_type DATA_PARTNER
linked_account 請勿設定 linked_account 欄位。
product_destination_id 目標對象的 ID。
資源管理
要求標頭
login-account accountTypes/DATA_PARTNER/accounts/DATA_PARTNER_ID
linked-account 請勿設定 linked-account 標頭。

以下範例說明如何使用合作夥伴連結,將 Destination 資料傳送至 Google Ad Manager 帳戶:

擷取
      {
        "destinations": [
          {
            "operatingAccount": {
              "accountId": "GAM_AUDIENCE_LINK_ID",
              "accountType": "GOOGLE_AD_MANAGER_AUDIENCE_LINK"
            },
            "loginAccount": {
              "accountId": "DATA_PARTNER_ID",
              "accountType": "DATA_PARTNER"
            },
            "productDestinationId": "AUDIENCE_ID"
          }
        ]
      }
      
資源管理
要求標頭
login-account accountTypes/DATA_PARTNER/accounts/DATA_PARTNER_ID
linked-account 請勿設定 linked-account 標頭。

Google Analytics

Data Manager API 不支援使用合作夥伴連結,將資料傳送至 Google Analytics 帳戶。請改用 Google Analytics 廣告主情境方法。

泛光燈

Data Manager API 不支援使用夥伴連結將資料傳送至 Floodlight 設定。請改用 Floodlight 廣告主情境方法。

詳細規定

本節詳細說明 IngestionService 要求的 Destination 帳戶欄位規定、資源管理要求的對等要求標頭、product_destination_id 設定提示,以及如何判斷憑證可存取的項目。

帳戶欄位

Destination 最多可有 3 個不同的帳戶:

operating_account

operating_account 為必填。

operating_account 會指出哪個帳戶會收到要求中的資料。operating_account 可以是下列任一值:

沒有與 Destination 的 operating_account 欄位相對應的要求標頭。傳送資源管理要求時,要求的目標帳戶就是操作帳戶。

login_account 欄位和 login-account 要求標頭

login_account 並非必要,在 IngestionService 要求中預設為 operating_account,在資源管理要求中則預設為目標帳戶。在資源管理要求中,請使用 login-account 要求標頭來識別登入帳戶。

Data Manager API 會驗證:

  1. 憑證的 Google 帳戶是登入帳戶中的使用者。

  2. 登入帳戶為下列其中之一:

linked_account 欄位和 linked-account 要求標頭

linked_account 表示哪個帳戶與 IngestionService 要求的 login_account 具有合作夥伴連結,或是資源管理要求的目標帳戶。

產品目的地 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 UI 或 Data Manager API 擷取這個 ID。

如要從 Google Ads 使用者介面取得目標對象 ID,請按照下列步驟操作:

  1. 前往 Google Ads 使用者介面的「目標對象管理工具」 。
  2. 按一下目標對象名稱,即可查看詳細資料。
  3. 目標對象 ID 會列在「List ID」旁邊。

Data Manager API

使用 List 方法擷取 UserList,視需要提供要求標頭,並使用 UserList 的 id 做為產品目的地 ID。

Google Ads 事件

用於擷取事件的產品目的地 ID 是轉換動作 ID。 請使用 Google Ads UI 或 Google Ads API 擷取這個 ID。

如要從 Google Ads 使用者介面取得轉換動作 ID,請按照下列步驟操作:

  1. 前往 Google Ads 使用者介面的「轉換」。
  2. 按一下轉換動作名稱。
  3. 前往「詳細資料」分頁。
  4. 轉換動作 ID 是「轉換類型 ID」旁的數字。

如要從 Google Ads API 取得轉換動作 ID,請按照下列步驟操作:

  1. 使用下列查詢,將 Search 或 SearchStream 要求傳送至 GoogleAdsService:

      SELECT
        conversion_action.id,
        conversion_action.name
      FROM conversion_action
      WHERE conversion_action.name = 'CONVERSION_ACTION_NAME'
    
  2. 從回應中 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,請按照下列步驟操作:

  1. 前往 https://displayvideo.google.com 登入 Display & Video 360 使用者介面。
  2. 前往用於operating_account的 Display & Video 360 夥伴或廣告主頁面。
  3. 前往左選單中的「目標對象」,然後選取「所有目標對象」。
  4. 在清單中找出目標對象。目標對象 ID 是「Name」(名稱) 欄中名稱旁的數字。

Data Manager API

使用 List 方法擷取 UserList,視需要提供要求標頭,並使用 UserList 的 id 做為產品目的地 ID。

Google Analytics 事件

產品目的地 ID 取決於資料串流類型。

網站資料串流
使用資料串流的評估 ID。
應用程式資料串流

請使用資料串流的 Firebase 應用程式 ID。您可以透過下列兩種方式找出 Firebase 應用程式 ID:

  • 在 Google Analytics UI 中,前往「資料串流」,按一下資料串流,然後尋找「FIREBASE 應用程式 ID」。
  • 使用 Firebase 控制台。

Floodlight 事件

將事件擷取至 Floodlight 的產品目的地 ID 是 Floodlight 活動 ID。請使用 Campaign Manager 360 UI 或 Campaign Manager 360 API 擷取這個 ID。

Campaign Manager 360 使用者介面

如要從 Campaign Manager 360 使用者介面取得 Floodlight 活動 ID,請按照下列步驟操作:

  1. 登入 Campaign Manager 360 使用者介面。
  2. 前往您用於operating_account的 Campaign Manager 360 廣告主。
  3. 前往左選單中的「Floodlight」,然後選取「活動」。
  4. 在清單中找出 Floodlight 活動。ID 是「活動名稱」欄中名稱旁邊的數字。

Campaign Manager 360 API

如要透過 Campaign Manager 360 API 取得 Floodlight 活動 ID,請按照下列步驟操作:

  1. 傳送 list 要求至 floodlightActivities 資源。
  2. 指定 Floodlight 設定的 floodlightConfigurationId。
  3. 您也可以使用 searchString 參數,依活動名稱篩選。
  4. 從回應中所選 FloodlightActivity 的 id 欄位取得 Floodlight 活動 ID。

判斷憑證可存取的範圍

您用來授權 Data Manager API 要求的憑證,會與特定 Google 帳戶建立關聯。

  • 如果您使用使用者憑證,系統會以在您產生憑證時,授權代表其執行動作的使用者 Google 帳戶,授權要求。
  • 如果使用服務帳戶憑證,系統會以服務帳戶的 Google 帳戶授權要求。

請按照下列步驟,確認憑證的 Google 帳戶是否能存取 Google Ads、Display & Video 360、Google Analytics 或 Campaign Manager 360 帳戶。

Google Ads 或資料合作夥伴

  1. 在 Google Ads 使用者介面中,前往login_account的「存取權和安全性」 。
  2. 選取 [Users] (使用者) 分頁標籤。
  3. 如果 login_account 是 Google Ads 管理員帳戶,請關閉「Show users in full hierarchy」(以完整階層顯示使用者) 切換鈕,隱藏子帳戶的使用者。
  4. 確認憑證的 Google 帳戶列在「Users」(使用者) 分頁顯示的帳戶清單中。

Display & Video 360

  1. 前往 Display & Video 360 使用者介面的「使用者管理和電子郵件接收設定」。
  2. 確認「User management」(使用者管理) 顯示憑證的 Google 帳戶是 login_account 的使用者。

Google Analytics

  1. 前往 Google Analytics UI 中的「資源存取權管理」。
  2. 確認已選取 login_account 中指定的 Google Analytics 資源。
  3. 確認憑證的 Google 帳戶具備資源的「編輯者」或「管理員」角色。

Floodlight (Campaign Manager 360)

  1. 登入 Campaign Manager 360 使用者介面。
  2. 在左選單中,依序前往「管理」 >「使用者設定檔」。
  3. 確認憑證的 Google 帳戶位於顯示的設定檔清單中。
  4. 按一下設定檔,確認該設定檔有權存取做為 login_account 的廣告主帳戶。如未在要求中設定 login_account,系統會預設為 operating_account。請確認帳戶具備「插入離線轉換」權限的使用者角色。