欄位對應

請使用表格中的對應項目,將 Google Ads API 中的 UploadClickConversionRequest 對應至 Data Manager API 中的 IngestEventsRequest 對應項目。

驗證

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

要求欄位

UploadClickConversionRequest (Google Ads API) IngestEventsRequest (Data Manager API) 附註
  • customer_id
  • developer-token 要求標頭
  • login-customer_id 要求標頭
  • linked-customer-id 要求標頭
  • conversion_action
destinations 請參閱「顧客和轉換動作欄位」。
無對應報告 consent 要求的事件可選用預設同意聲明設定。如要覆寫個別活動的這項值,請設定 Eventconsent 欄位。
無對應報告 encoding 必要:設為用於 UserIdentifier 值的 Encoding
無對應報告 encryption_info 設定要求是否包含加密值。詳情請參閱「加密」一文。
job_id 無對應報告 使用回應中傳回的 request_id 擷取診斷
partial_failure 無對應報告 Data Manager API 採用快速失敗錯誤模型。如果 IngestEventsRequest 的任何欄位驗證失敗,Data Manager API 就會拒絕整個要求。
validate_only validate_only
conversions events 轉換或事件清單。詳情請參閱「轉換欄位」一節。

客戶和轉換動作欄位

Google Ads API 需要 developer-token 要求標頭,您可針對不同驗證情境設定 login-customer-idlinked-customer-id 要求標頭

Data Manager API 不需要開發人員權杖,您可以使用 Destination 的欄位指定登入和連結的顧客資訊,而不是要求標頭。如要進一步瞭解目的地,請參閱「設定目的地」。

以下說明如何將單一 conversion_action 的 Google Ads API 欄位對應至 Destination 中的對等欄位:

Google Ads API Destination (Data Manager API) 附註
customer_id的要求 operating_account account_id 設為 Google Ads 轉換帳戶的客戶 ID。這可能與 Google Ads API 要求中的 customer_id 不同。將 operating_accountaccount_type 設為 GOOGLE_ADS
developer-token 要求標頭 無對應報告 資料管理工具 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 欄位。
conversion_action (ClickConversion) product_destination_id 請設為轉換動作的數字 ID。請勿使用 ConversionAction 的資源名稱。
無對應報告 reference Destination 的使用者定義 ID。如果您在單一要求中傳送多個轉換動作的轉換,請設定這個欄位。

轉換欄位

ClickConversion (Google Ads API) Event (Data Manager API) 附註
cart_data cart_data 詳情請參閱「購物車資料欄位」一節。
consent consent 這兩個 API 都使用類似的 Consent 物件 (ad_user_dataad_personalization)。
對於 Data Manager API,您也可以設定要求層級的 consent 欄位,為要求中的所有事件設定同意聲明。
conversion_action destination_references 如果在單一要求中傳送多個轉換動作的轉換,請將這個欄位設為對應的reference目的地
conversion_date_time event_timestamp
詳情請參閱「時間戳記格式」。
conversion_environment 無對應報告
conversion_value conversion_value 設為貨幣值,而非微元值。舉例來說,如果轉換價值為 $5.23 美元,請使用 5.23 值。
currency_code currency
custom_variables custom_variables 詳情請參閱「自訂變數欄位」一節。
customer_type user_properties.customer_type 設為 CustomerType 列舉中的值。
無對應報告 event_source
無對應報告 event_device_info
external_attribution_data 無對應報告
gbraid ad_identifiers.gbraid
gclid ad_identifiers.gclid
無對應報告 last_updated_timestamp
order_id transaction_id
session_attributes_encoded ad_identifiers.session_attributes 詳情請參閱「新增工作階段屬性」。
session_attributes_key_value_pairs experimental_fields 詳情請參閱「新增工作階段屬性」。
user_identifiers user_data.user_identifiers 詳情請參閱使用者 ID 欄位
user_ip_address landing_page_device_info.ip_address
wbraid ad_identifiers.wbraid

購物車資料欄位

CartData (Google Ads API) CartData (Data Manager API) 附註
feed_country_code merchant_feed_label 設為動態饋給標籤
feed_language_code merchant_feed_language_code
items items
local_transaction_cost transaction_discount
merchant_id merchant_id

購物車資料的商品欄位

Item (Google Ads API) Item (Data Manager API) 附註
product_id merchant_product_id
quantity quantity
unit_price unit_price
無對應報告 item_id
無對應報告 additional_item_parameters

自訂變數欄位

CustomVariable (Google Ads API) CustomVariable (Data Manager API) 附註
無對應報告 destination_references Google Ads API 規定每個轉換動作都必須有各自的要求。Data Manager API 支援在單一要求中傳送多個轉換動作的轉換,以及使用這個 destination_references 欄位,指出應接收特定自訂變數的目的地。
conversion_custom_variable variable 設為變數名稱,而非資源名稱。
value value

使用者 ID 欄位

UserIdentifier (Google Ads API) UserIdentifier (Data Manager API)
address_info address 請遵守格式和雜湊處理規範。您也可以加密地址的雜湊屬性
hashed_email email_address 設為格式化並經過雜湊處理的電子郵件地址。您也可以加密經過雜湊處理的電子郵件地址
hashed_phone_number phone_number 設為格式化並經過雜湊處理的電話號碼。您也可以加密雜湊電話號碼
其他欄位:
  • mobile_id
  • third_party_user_id
  • user_identifier_source
不相關 這兩個 API 都不支援離線轉換或待開發客戶強化轉換的這些 ID, 而且 Data Manager API 在傳送轉換事件做為額外資料來源時,也不支援這些 ID。

回覆欄位

UploadClickConversionResponse (Google Ads API) IngestEventsResponse (Data Manager API) 附註
job_id 無對應報告 使用回應中傳回的 request_id 擷取診斷
partial_failure_error 無對應報告 Data Manager API 採用快速失敗錯誤模型。如果 IngestEventsRequest 的任何欄位驗證失敗,Data Manager API 就會拒絕整個要求。
request-id 回應標頭 request_id 要求 ID 會以 Data Manager API 中的回應欄位形式傳回,而非回應標頭。
results 無對應報告 Data Manager API 會以非同步方式處理事件。使用診斷功能查看處理結果。