Google 會運用 AI 技術將內容翻譯成你偏好的語言,但可能會出錯。
欄位對應
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
請使用表格中的對應關係,將 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 |
要求中事件的選用預設同意聲明設定。如要覆寫個別事件的這個值,請設定 Event 的 consent 欄位。 |
| 無對應報告 |
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-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。這可能與 Google Ads API 要求中的 customer_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 欄位。 |
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_data、ad_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 欄位
回應欄位
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 會以非同步方式處理事件。使用診斷功能查看處理結果。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2026-10-21 (世界標準時間)。
[null,null,["上次更新時間:2026-10-21 (世界標準時間)。"],[],[]]