欄位對應

請使用欄位對應,將目標顧客比對工作流程的每個步驟,從 Google Ads API 升級至 Data Manager API:

  • 目標對象管理工具欄位對應包含用於建立、更新和擷取目標對象的欄位對應。

  • 「Ingestion field mappings」(擷取欄位對應) 包含用於新增或移除目標對象成員的欄位對應。

驗證

Data Manager API 需要的憑證範圍與 Google Ads API 不同。請按照「設定 API 存取權」中的步驟操作,產生包含 Data Manager API 範圍的新憑證。

目標對象管理工具欄位對應

請使用表格中的對應關係,將 Google Ads API 中的 UserList 對應至 Data Manager API 中的 UserList。

UserList (Google Ads API) UserList (Data Manager API) 附註
resource_name name 詳情請參閱「資源名稱」。
id id
read_only read_only
name display_name 必要
description description 必要
membership_status membership_status
integration_code integration_code
membership_life_span membership_duration

目標對象成員加入名單後,在名單中保留的時間長度。這個值必須對應至整數天數。如未設定,則預設為最大值。

請使用時間戳記格式設定值。

size_for_display size_info.display_network_members_count
size_range_for_display 沒有效果相當的功能。 請使用 size_info.display_network_members_count 取得大小資訊。
size_for_search size_info.search_network_members_count
size_range_for_search 沒有效果相當的功能。 請使用 size_info.search_network_members_count 取得大小資訊。
type 沒有效果相當的功能。
access_reason access_reason
account_user_list_status account_access_status
closing_reason closing_reason
eligible_for_search target_network_info.eligible_for_search
eligible_for_display target_network_info.eligible_for_display
match_rate_percentage ingested_user_list_info.contact_id_info.match_rate_percentage
basic_user_list ingested_user_list_info.pseudonymous_id_info 不會用於目標顧客比對。
crm_based_user_list ingested_user_list_info 必填項目。請參閱「目標顧客比對目標對象資訊」。
沒有效果相當的功能。 ingested_user_list_info.pair_id_info 不會用於目標顧客比對。
沒有效果相當的功能。 ingested_user_list_info.partner_audience_info 不會用於目標顧客比對。
logical_user_list 沒有效果相當的功能。 不會用於目標顧客比對。
logical_user_list 沒有效果相當的功能。 不會用於目標顧客比對。
lookalike_user_list 沒有效果相當的功能。 不會用於目標顧客比對。
rule_based_user_list 沒有效果相當的功能。 不會用於目標顧客比對。
similar_user_list 沒有效果相當的功能。 不會用於目標顧客比對。

目標顧客比對目標對象資訊

在 Google Ads API 中,建立目標顧客比對目標對象時,您必須將 crm_based_user_list 欄位設為 CrmBasedUserListInfo。

在 Data Manager API 中,將 ingested_user_list_info 欄位設為 IngestedUserListInfo,然後設定目標顧客比對和使用者資料類型的必要欄位,即可設定對應的屬性。

聯絡資訊

upload_key_types
設為包含 CONTACT_ID 的清單。這相當於在 Google Ads API 中將 upload_key_type 設為 CONTACT_INFO。
contact_id_info

設為 ContactIdInfo。

將 data_source_type 設為 DATA_SOURCE_TYPE_FIRST_PARTY。這相當於在 Google Ads API 中將 data_source_type 設為 FIRST_PARTY。

數位身分證件

upload_key_types
設為包含 MOBILE_ID 的清單。這相當於在 Google Ads API 中將 upload_key_type 設為 MOBILE_ADVERTISING_ID。
mobile_id_info

設為 MobileIdInfo。

  • 將 data_source_type 設為 DATA_SOURCE_TYPE_FIRST_PARTY。這相當於在 Google Ads API 中將 data_source_type 設為 FIRST_PARTY。
  • 將 key_space 設為 IOS 或 ANDROID。Data Manager API 需要這個值。這與 Google Ads API 不同,後者的鍵空間是從 app_id 推論而來。
  • 將 app_id 設為字串,用於識別收集資料的行動應用程式。請使用與 Google Ads API 中 app_id 相同的格式。

使用者 ID

upload_key_types
設為包含 USER_ID 的清單。這相當於在 Google Ads API 中將 upload_key_type 設為 CRM_ID。
user_id_info

設為 UserIdInfo。

將 data_source_type 設為 DATA_SOURCE_TYPE_FIRST_PARTY。這相當於在 Google Ads API 中將 data_source_type 設為 FIRST_PARTY。

資源名稱

Data Manager API 使用的資源名稱格式與 Google Ads API 不同。

Google Ads API

在 Google Ads API 中,UserList 資源名稱的格式如下:

customers/{customer_id}/userLists/{user_list_id}

Data Manager API

在 Data Manager API 中,UserList 資源名稱的格式如下:

accountTypes/{accountType}/accounts/{account}/userLists/{userList}

上傳欄位對應

請使用表格中的對應關係,將 Google Ads API 中的 AddOfflineUserDataJobOperationsRequest 對應至 Data Manager API 中的對等 IngestionService 要求。

要求欄位

這些對應關係以 Data Manager API 中的 IngestAudienceMembersRequest 為參考依據,但如果您要將 Google Ads API 要求轉換為 RemoveAudienceMembersRequest 或 RemoveAllAudienceMembersRequest,也可以使用這些對應關係。

AddOfflineUserDataJobOperationsRequest (Google Ads API) IngestAudienceMembersRequest (Data Manager API) 附註
  • customer_id 欄位
  • OfflineUserDataJob 的 customer_match_user_list_metadata 欄位
  • developer-token 要求標頭
  • login-customer_id 要求標頭
  • linked-customer-id 要求標頭
destinations 請參閱「顧客和目標對象欄位」。
OfflineUserDataJob 的 customer_match_user_list_metadata consent consent 要求中目標對象成員的預設同意聲明設定 (選用)。您可以設定 AudienceMember 的 consent 欄位,覆寫個別目標對象成員的這個值。
無對應報告 encoding 必要:設為用於 UserIdentifier 值的 Encoding。
無對應報告 encryption_info 如果要求包含加密值,請設定此屬性。詳情請參閱「加密」。
job_id 無對應報告 使用回應中傳回的 request_id 擷取診斷。
enable_partial_failure 無對應報告 Data Manager API 採用快速失敗錯誤模型。如果 IngestAudienceMembersRequest 的任何欄位未通過驗證,Data Manager API 會拒絕整個要求。使用診斷功能擷取處理錯誤。
enable_warnings 無對應報告 Data Manager API 不會在回應中回報警告。使用診斷功能擷取處理警告。
validate_only validate_only
operations audience_members 要新增或移除的目標對象成員清單。詳情請參閱作業欄位一節。
無對應報告 terms_of_service 必填項目。設定這個參數,表示使用者已接受或拒絕目標顧客比對服務條款。

顧客和目標對象欄位

Google Ads API 僅支援將目標對象成員上傳至一個目標對象。此外,您必須提供 developer-token 要求標頭,並為不同的驗證情境設定 login-customer-id 和 linked-customer-id 要求標頭。

Data Manager API 支援在單一要求中傳送多個目標對象的成員。Data Manager API 不需要開發人員權杖,您可以使用 Destination 的欄位 (而非要求標頭) 指定登入和連結的客戶資訊。如要進一步瞭解目的地,請參閱「設定目的地」。

在 Google Ads API 中,您可以將 OfflineUserDataJobOperation 的 remove_all 欄位設為 true,藉此移除目標對象的所有成員。

在 Data Manager API 中,您可以傳送 RemoveAllAudienceMembersRequest 來達成這項操作。詳情請參閱「移除所有成員」指南。

如要將單一目標對象的 Google Ads API 欄位,對應至 Destination 中的對等欄位,請按照下列步驟操作:

Google Ads API Destination (Data Manager API) 附註
要求的customer_id operating_account 將 account_id 設為目標對象的客戶 ID。將 operating_account 的 account_type 設為 GOOGLE_ADS。
developer-token 要求標頭 無對應報告 使用 Data Manager API 時,不需要開發人員權杖。
login-customer-id 要求標頭 login_account 將 account_id 設為登入帳戶的客戶 ID。如果登入帳戶是 Google Ads 帳戶,請將 account_type 設為 GOOGLE_ADS;如果登入帳戶是資料合作夥伴帳戶,請將 account_type 設為 DATA_PARTNER。
linked-customer-id 要求標頭 linked_account 如果您是透過合作夥伴連結存取 operating_account,請將 account_id 設為已連結帳戶的客戶 ID,並將 account_type 設為 DATA_PARTNER。否則,請勿設定 linked_account 欄位。
OfflineUserDataJob 的 customer_match_user_list_metadata user_list product_destination_id 必填項目。設為目標對象的數字 ID。請勿使用 UserList 的資源名稱。
無對應報告 reference Destination 的使用者定義 ID。如果您在單一要求中傳送多個目標對象的目標對象成員,請設定這個欄位。

作業欄位

Data Manager API 包含新增和移除目標對象成員的不同方法。相較之下,Google Ads API 中的 AddOfflineUserDataJobOperationsRequest 包含 operations 清單,每個清單都會根據作業類型新增成員、移除成員或移除所有成員。以下是各作業類型與 Data Manager API 中對應方法的對照表:

OfflineUserDataJobOperation (Google Ads API) IngestionService 方法 (Data Manager API) 附註
create IngestAudienceMembers 詳情請參閱「目標對象成員欄位」一節。
remove RemoveAudienceMembers 詳情請參閱「目標對象成員欄位」一節。
remove_all RemoveAllAudienceMembers 詳情請參閱「移除所有目標對象成員」。

目標對象成員欄位

UserData (Google Ads API) AudienceMember (Data Manager API) 附註
consent consent

設定目標對象成員的同意聲明。

這兩個 API 使用類似的 Consent 物件 (ad_user_data、ad_personalization)。

如果是 Data Manager API,您也可以設定要求層級的 consent 欄位,為要求中的所有目標對象成員設定同意聲明。

transaction_attribute 沒有效果相當的功能。 不適用於目標顧客比對。
user_attribute 沒有效果相當的功能。 不適用於目標顧客比對。
user_identifiers
  • mobile_data
  • user_id_data
  • composite_data
    • user_data
    • ip_data

根據您要傳送的目標對象成員資料類型,填入對應的欄位。詳情請參閱「使用者 ID 欄位」。

使用者 ID 欄位

在 Google Ads API 中,無論您要傳送聯絡資訊、數位身分證件或使用者 ID,都請使用 UserIdentifier。Data Manager API 則採用不同方法,每種資料類型都有不同的欄位。

在 Data Manager API 中,填入與您要傳送的資料類型相對應的欄位:

聯絡資訊

如要使用電子郵件地址、電話號碼或地址等聯絡資訊,請將 composite_data 設為 CompositeData,並在 user_data.user_identifiers 中為每項聯絡資訊分別建立一個項目。

雖然我們仍支援 user_data,但建議您使用 composite_data,確保整合功能已準備好因應日後的改善。詳情請參閱「複合資料」。

UserIdentifier (Google Ads API) UserIdentifier (Data Manager API) 附註
address_info address 詳情請參閱「地址欄位」。
hashed_email email_address 設為經過格式設定和雜湊處理的電子郵件地址。您也可以加密經雜湊處理的電子郵件地址。
hashed_phone_number phone_number 設為經過格式設定和雜湊處理的電話號碼。您也可以加密經雜湊處理的電話號碼。
user_identifier_source 沒有效果相當的功能。

地址欄位

以下是 Google Ads API 中 OfflineUserAddressInfo 與 Data Manager API 中 AddressInfo 的欄位對應關係。如果您使用聯絡資訊填入目標顧客比對目標對象,請使用這些對應。

OfflineUserAddressInfo (Google Ads API) AddressInfo (Data Manager API) 附註
city 沒有效果相當的功能。
country_code region_code 必要
hashed_first_name given_name

必填項目。設為經過格式設定和雜湊處理的名字。您也可以加密經雜湊處理的名字。

hashed_last_name family_name

必填項目。設為經過格式設定和雜湊處理的姓氏。您也可以加密經雜湊處理的姓氏。

hashed_street_address 沒有效果相當的功能。
postal_code postal_code 必要
state 沒有效果相當的功能。

IP 位址

除了使用者 ID 之外,Data Manager API 也支援在目標顧客比對上傳資料中加入 IP 位址。這些元件由 CompositeData 提供,其中包含 UserData 和 IpData。一併提供這些欄位有助於提高媒合率。

詳情請參閱「 目標顧客比對的 IP 擷取」一文。

Google Ads API CompositeData (Data Manager API) 附註
沒有效果相當的功能。 ip_data.ip_address 設為原始 IPv4 或 IPv6 位址。請參閱 IP 位址格式指南。
沒有效果相當的功能。 ip_data.observe_start_time 設為首次觀察到 IP 位址時的時間戳記 (採用 RFC 3339 格式)。
沒有效果相當的功能。 ip_data.observe_end_time 設為上次觀測到 IP 位址的時間戳記,採用 RFC 3339 格式。
user_identifiers user_data 設為 UserData 物件。

數位身分證件

如果使用數位身分證件,請將 mobile_data 設為 MobileData,並在 mobile_ids 中為每個 ID 建立項目。

UserIdentifier (Google Ads API) MobileData (Data Manager API) 附註
mobile_id mobile_ids 設為目標對象成員的數位身分證件 清單。

在 Google Ads API 中,您需要為目標對象成員的每個數位身分證件,分別新增 UserIdentifier 和 mobile_id。在 Data Manager API 中,新增單一 MobileData,並將 mobile_ids 設為目標對象成員的所有 Mobile ID 清單。

user_identifier_source 沒有效果相當的功能。

使用者 ID

如果使用使用者 ID,請將 user_id_data 設為 UserIdData,並將 user_id 設為目標對象成員的使用者 ID。

UserIdentifier (Google Ads API) UserIdData (Data Manager API) 附註
third_party_user_id user_id

在 Google Ads API 中,您要為目標對象成員的每個使用者 ID,新增獨立的 UserIdentifier 和 third_party_user_id。

在 Data Manager API 中,將 user_id_data 欄位設為 UserIdData,並將其 user_id 欄位設為目標對象成員的使用者 ID。您無法為同一位目標對象成員傳送多個使用者 ID。

user_identifier_source 沒有效果相當的功能。