SCALIX help

← All tools

gads_upload_click_conversions

Google Ads write high risk

Part of the Offline Conversion Agent.

What it does

Upload offline click conversions (ConversionUploadService) keyed by gclid (or wbraid/gbraid) + conversion_action + conversion_date_time, with optional conversion_value, currency_code, and order_id (for dedup/adjustment). Supports enhanced-conversions-for-leads via hashed user_identifiers. consent.{ad_user_data, ad_personalization} should always be populated; required GRANTED for EEA/UK/CH (unknown -> DENIED, else unattributed). Uses partial_failure=true so good rows succeed while bad rows report errors. conversion_value is a plain currency amount (NOT micros). WRITE with preview->approve->commit: preview shows row count, total value, consent state + preview_id; commit performs the upload + audit. Returns {total_uploaded, successful, failed, errors}. Upload != immediate reporting; conversions appear after Google processes them. [REMINDER] The ConversionUploadService sunset took effect June 15, 2026 — this method is now enforced off for developer tokens not historically allowlisted for offline click-conversion uploads (CUSTOMER_NOT_ALLOWLISTED_FOR_THIS_FEATURE); new integrations must use the Data Manager API. PREVIEW SEMANTICS: the first call (no preview_id) is sent to the Google Ads API in validation mode — field, enum, policy and permission errors surface AT PREVIEW, nothing is changed, and the response returns a preview_id. To apply, show the preview to the user, get their approval, and re-call with that preview_id and IDENTICAL arguments within 30 minutes; changed arguments or an expired token fail closed to a fresh preview.

When to use it

Use to import offline/CRM-closed conversions back into Google Ads. Preview the row count, total value, and consent state; confirm the data is authorized and consented; then commit. Set consent for any EEA/UK/CH conversions or they go unattributed.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit CID; strip dashes.
conversionsarrayyesRows: {gclid (or wbraid/gbraid), conversion_action (the ConversionAction resource_name OR a bare conversion-action id), conversion_date_time ('YYYY-MM-DD HH:MM:SS+TZ'), conversion_value (plain currency), currency_code (ISO-4217), order_id (optional, for dedup), user_identifiers (optional hashed, for enhanced conversions)}.
consent_ad_user_datastringnoGRANTED/DENIED/UNSPECIFIED; required GRANTED for EEA/UK/CH. Applied to all rows unless per-row override.
consent_ad_personalizationstringnoGRANTED/DENIED/UNSPECIFIED; required GRANTED for EEA/UK/CH.
manager_idstringnoOptional MCC login-customer-id.
validate_onlybooleannoOptional. true forces another preview even with a preview_id; false is DEPRECATED and no longer commits — only a valid preview_id applies the write.
preview_idstringnoOmit it to preview: nothing is applied, and the call returns a preview_id bound to this exact request. Pass it only after the user approves that preview in a later message, with the same arguments (leave out validate_only, and add any confirmation flag the preview names). Single-use, expires in 30 minutes; changed arguments need a fresh preview.

Safeguards

A change in two steps. The first call previews and changes nothing; Claude shows you the preview and applies it only after you approve, within 30 minutes and with the same arguments. Every applied change goes to the audit log. How changes are approved.

Policy

Upload only conversions you are authorized to attribute, with hashed user data and proper EU consent (Consent Mode); never upload conversions to inflate reported results. gclid/identifiers are sensitive — hash any PII (enhanced conversions) and purge after upload.

Reminder

gclids and any user identifiers are sensitive; hash PII, set EU consent, purge raw data after upload, never log it. The ConversionUploadService sunset took effect June 15, 2026 — non-allowlisted developer tokens are now blocked; migrate to the Data Manager API. A sunset warning rides on every preview and commit response.

Errors

Error classMeansWhat to doRetry
PARTIAL_FAILURESome conversion rows failed (e.g., gclid too old, action mismatch) while others succeeded.Report failed indices + reasons from partial_failure_error; the rest were accepted.no
CUSTOMER_NOT_ALLOWLISTED_FOR_THIS_FEATUREThe developer token is not allowlisted for offline click-conversion uploads via ConversionUploadService (June 15, 2026 enforcement); this is determined by the developer token's allowlisting history, not a per-account toggle.Do not retry against this method — surface a clear message that the upload was blocked and migrate to the Data Manager API for offline conversion ingestion.no
INVALID_ARGUMENTMalformed row (bad date format, missing gclid+action, negative value).Surface the platform message; fix the row and re-preview.no
CONVERSION_ACTION_NOT_UPLOAD_TYPEThe conversion_action is not an UPLOAD/import type.Create or target an UPLOAD_CLICKS conversion action first.no
TOKEN_REVOKEDOAuth token expired/revoked.Refresh and retry once; else prompt reconnect (needs_reauth).yes
CUSTOMER_NOT_FOUNDCustomer ID not found/accessible.Verify the CID is authorized.no
PERMISSION_DENIEDNo access or out-of-bearer-scope write.Confirm access and write scope; else refuse.no
RESOURCE_EXHAUSTEDRate/quota exceeded (HTTP 429).Backoff 5/10/20s cap 60s, then retry.yes
INTERNAL_ERRORTransient Google server error (5xx).Retry after backoff.yes

Edge cases

  • conversion_value is plain currency, NOT micros.
  • gclid older than the conversion action's click-through lookback window is rejected per-row (partial failure).
  • conversion_date_time must include timezone offset and be after the click and not in the future.
  • order_id enables later adjustment/dedup — recommend supplying it.
  • EEA rows without GRANTED consent are accepted but won't be attributed -> warn the effective count may be lower.
  • validate_only (preview) and partial_failure (commit) are mutually exclusive — never set both.
  • Duplicate order_id/gclid+time uploads dedupe rather than double-count.
  • Developer token not allowlisted -> CUSTOMER_NOT_ALLOWLISTED_FOR_THIS_FEATURE: do not silently fail; tell the user the method is blocked (June 15, 2026 sunset) and to migrate to the Data Manager API.
  • Expired token -> refresh once and retry; preview_id TTL expiry -> re-preview.