欄位對應

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

驗證

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

要求欄位

UploadCallConversionsRequest (Google Ads API) IngestEventsRequest (Data Manager API) 附註
  • customer_id
  • login-customer-id 要求標頭
  • linked-customer-id 要求標頭
  • conversion_action
destinations 請參閱「客戶和轉換動作欄位」。
無對應報告 consent (選用步驟) 要求中所有事件的預設同意聲明設定。Google Ads API 只能為個別轉換設定同意聲明,Data Manager API 則可為整個要求設定同意聲明。如要覆寫個別活動的預設值,請設定 Event 的 consent 欄位。
無對應報告 encoding 必要:設為用於 UserIdentifier 值的 Encoding (HEX 或 BASE64)。
partial_failure 無對應報告 Data Manager API 採用快速失敗錯誤模型。如果 IngestEventsRequest 的任何欄位未通過驗證,Data Manager API 會拒絕整個要求。如果要求成功,請使用診斷功能,擷取個別事件的錯誤和警告。
validate_only validate_only
conversions events 轉換或事件清單。詳情請參閱「轉換欄位」。

客戶和轉換動作欄位

在 Google Ads API 中,您需要為不同的驗證情境設定 login-customer-id 和 linked-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。將 operating_account 的 account_type 設為 GOOGLE_ADS。
developer-token 要求標頭 無對應報告 Data Manager API 不會使用開發人員權杖。Google Ads API 也不再需要開發人員權杖。
login-customer-id 要求標頭 login_account 將 account_id 設為登入帳戶的客戶 ID。如果登入帳戶是 Google Ads 帳戶,請將 account_type 設為 GOOGLE_ADS;如果登入帳戶是資料合作夥伴帳戶,請將 設為 DATA_PARTNER。
linked-customer-id 要求標頭 linked_account 僅適用於透過合作夥伴連結傳送資料的資料合作夥伴。如果合作夥伴連結是與operating_account的上層管理員帳戶建立,請將account_id設為具有合作夥伴連結的 Google Ads 帳戶客戶 ID,並將account_type設為GOOGLE_ADS。如果合作夥伴連結直接連至 operating_account,請勿設定 linked_account 欄位。請參閱「資料合作夥伴情境」。
conversion_action (CallConversion) product_destination_id 設為UPLOAD_CALLS轉換動作的數字 ID。請勿使用 ConversionAction 的資源名稱。
無對應報告 reference Destination 的使用者定義 ID。如果您將事件傳送至多個目的地,請設定這個欄位。

轉換欄位

CallConversion (Google Ads API) Event (Data Manager API) 附註
caller_id user_data.user_identifiers[].phone_number 必填項目。請將電話號碼設為 E.164 格式,使用 SHA-256 進行雜湊處理,再以十六進位或 Base64 編碼雜湊,然後在 UserData 物件中設定 UserIdentifier 的 phone_number 欄位。此外,請在 IngestEventsRequest 上設定 encoding。
call_start_date_time call_info.start_timestamp 必填項目。在 CallInfo 物件上設定 start_timestamp。
詳情請參閱「時間戳記格式」。
consent consent 這兩個 API 使用類似的 Consent 物件 (ad_user_data、ad_personalization)。如果是 Data Manager API,您也可以設定要求層級的 consent 欄位,為要求中的所有事件設定同意聲明。
conversion_action destination_references 在目的地上設定 product_destination_id。如要將事件傳送至多個目的地,請將 destination_references 設為目的地的對應 reference。
conversion_date_time event_timestamp 必填項目。不得早於 call_info.start_timestamp。
詳情請參閱「時間戳記格式」。
conversion_value conversion_value
currency_code currency
custom_variables custom_variables 詳情請參閱「自訂變數欄位」。
無對應報告 event_source (選用步驟) 設為有效的 EventSource 列舉值。

自訂變數欄位

CustomVariable (Google Ads API) CustomVariable (Data Manager API) 附註
無對應報告 destination_references 如果將事件傳送至多個目的地,請使用這個欄位,指出哪些目的地應接收特定自訂變數。
conversion_custom_variable variable 設為變數名稱,而非資源名稱。
value value

回應欄位

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