Google Ads - Conversions
What is Google Ads - Conversions?
Google Ads is an online advertising platform that enables businesses to display ads on Google's search engine results pages and its network of partner websites and platforms. Advertisers can target their ads based on keywords, demographics, interests, and behaviors. It provides a powerful means for businesses to reach their target audience, drive traffic to their websites, and promote their products or services effectively.
The Google Ads - Conversions integration uses Google Ads' Upload Click Conversions API to track click-based conversions.
Product Type: Advertising
Integration Type: Starter Kit & ID Sync
Event Source Type: Web, Mobile Browser, & Mobile App
Event Scope: Conversion Events Only
Capabilities
- Streamline, standardize, and control customer data before reaching Google Ads.
- Decrease the presence of Google tags on your website to enhance SEO performance and overall website experience.
- Improve match rates with Enhanced Conversions using hashed email and phone identifiers alongside gclid.
Considerations
- Scope — Click-Through Conversions Only - This integration tracks click-through conversions only via the Upload Click Conversions API. It does not include Google Ads Customer Match or view-through conversion tracking.
- Offline Conversions - This integration uses offline conversions only. New offline conversion actions must be created in Google Ads and mapped to your MetaRouter events in the starter kit playbook before they will record.
- Event Filtering - Events without at least one identifier (
gclid, email, or phone) are dropped before delivery. Ensure your gtag sync is correctly capturinggclidfrom URL parameters, or thattraits.emailortraits.phoneare present as a fallback. - API Version - API v16 is deprecated and returns 404 errors. The current version is v22, which is the default in the updated starter kit. Version is configurable via the
API_VERSIONconnection parameter. - Batch Processing - Conversions are sent in batches of up to 100 per request with
partial_failure: true, allowing some conversions in a batch to succeed even if others fail. - Partial Failure Responses - The Google Ads API returns HTTP 200 even when individual conversions fail. Errors appear in the response body under
partialFailureErrorand do not trigger automatic retry. Check response bodies or GCP logs to catch silent conversion failures. - Consent Field Behavior -
consent.ad_user_dataandconsent.ad_personalizationare sent as"GRANTED"by default. If an event reaches the forwarder it has already passed the consent middleware filtering — events that make it through are implicitly consented. - GA4 Path Considerations - When using the GA4 import path, accurately mapping GA4 events to your Google Ads conversion goals is critical. Understand how your chosen attribution model impacts how conversions are credited across touchpoints.
- First-Party Audience Segments - To track first-party users in Google Ads audience segments, use the add-on integration Google AJSID Segments alongside this integration.
Getting Started - From Your Google Ads Account
Ensure Auto Tagging is Enabled
Auto-tagging attaches the gclid parameter to the URL your customers click through. Auto-tagging is on by default for new accounts. You can check whether auto-tagging is on by going to your account settings:
- In your Google Ads account, click Admin on the left page menu.
- Select Account settings from the options available.
- Under the "Account settings" menu, select the Auto-tagging drop-down.
- Confirm if the box next to "Tag the URL that people click through from my ad" is checked. If the box is checked, auto-tagging is on.
Find Your Customer ID
Your customer ID is a unique number used to identify your Google Ads account. It appears in the format 123-456-7890.
Set Up Authentication
Developer Token
- Sign into your manager account
- Navigate to Tools & Settings > Setup > API Center
- Navigate to API Access
- Under "Account Access" click APPLY FOR A DEVELOPER TOKEN
- Complete the application; a developer token is required for access to the API
Note: The developer token is at the top of the API Center screen. If the token reads "Test account", this will only work for test accounts not regular Google Ads accounts.
Service Account
- Contact your GCP Admin or SRE department to establish the appropriate Service Account
- Request a JSON key file for the service account
- Extract the
client_email(SERVICE_ACCOUNT_EMAIL) andprivate_key(PRIVATE_KEY) from the JSON key file - Ensure the service account has been granted access to your Google Ads account
Service Account Requirements:
| Property | Value |
|---|---|
| Type | Must be "service_account" |
| Format | Standard Google Cloud Service Account JSON key file |
| Authentication | JWT-based authentication via service account private key |
For detailed instructions, refer to the Service Accounts guide.
Create Offline Conversion Events
Set up conversion actions for each event you'd like to track. You will map your MetaRouter events to these conversion actions within the starter kit playbook.
- In your Google Ads account, click the Goals icon.
- Click the Conversions drop down in the section menu.
- Click Summary.
- Click New conversion action.
- Select Import.
- Select Manual import using API or uploads and select Track conversions from clicks.
- Click Continue.
- Choose conversion goal and action optimization.
- Enter Conversion name, Value, and Count.
- Click Done and click Save and continue.
- Click Done.
Note: The name entered here is what will appear in "All conversions" (but not "Conversions") in the Google Ads interface.
Adding a Google Ads - Conversions Integration
Google Tag Sync (ID Sync Configuration)
To gather the gclid, wbraid, and timezone_offset values required for conversion attribution, you must configure a Google Tag sync.
| Architecture | Description |
|---|---|
| Google Ads Sync - Decoupled | Google Ads as a separate sync under parent Google Tag Settings |
| Google Tag Sync - Coupled (Legacy) | Google Ads bundled with GA4/CM360 in single Google Gtag sync |
Google Ads - Starter Kit
From the integration library, add a "Google Ads - Conversions" integration. Then, fill out the Connection Parameters:
| Connection Parameter | Description |
|---|---|
API_VERSION | Google Ads API version. Default: v22 |
CUSTOMER_ID | Identifies your Google Ads account (e.g., 123-456-7890) |
DEVELOPER_TOKEN | Developer token obtained from Google Ads, API Center |
PRINCIPAL_EMAIL | The email you use to log in to Google Ads and the email that created the service account |
SERVICE_ACCOUNT_EMAIL | Email created in Google Cloud Platform, Service Accounts |
PRIVATE_KEY | Private key (PEM format) generated from Google Cloud Platform |
Add Integration to Pipeline
Once you've adjusted the starter kit:
- Go to Pipelines > Select your Pipeline
- Click the Right drop-down > Add Integration
- Select your Google Ads - Conversions integration and revision > Deploy
Event Mappings
MetaRouter provides all of the event mappings that Google Ads integrations typically require. You may add custom events, parameters, or mappings following Google Ads' API documentation.
Global Mappings
Global mappings apply to all events. Events must have at least one identifier (gclid, email, or phone) or they will be dropped.
| Output Key | Description | Expected Input |
|---|---|---|
conversionDateTime Required | String: Conversion timestamp with timezone. Format: yyyy-mm-dd hh:mm:ss+|-hh:mm | Expression (uses context.providers.googleGtag.data.timezone_offset) |
gclid | String: Google Click ID | context.providers.googleGtag.data.gclid |
wbraid | String: iOS web-to-app identifier | context.providers.googleGtag.data.wbraid |
userIpAddress | String: User's IP address | context.ip |
userIdentifiers | Array: Hashed email and/or phone identifiers | Expression (SHA256 hashed) |
consent.ad_user_data | String: User data consent | Enrichment - GRANTED |
consent.ad_personalization | String: Personalization consent | Enrichment - GRANTED |
Enhanced Conversions (User Identifiers)
Enhanced Conversions allow you to supplement your conversion data with hashed first-party customer data, improving match rates when gclid is not available.
| Identifier Type | Processing | Source |
|---|---|---|
hashedEmail | Cleaned, normalized, SHA256 hashed | traits.email |
hashedPhoneNumber | Normalized (E.164 format), SHA256 hashed | traits.phone |
Example userIdentifiers output:
{
"userIdentifiers": [
{ "hashedEmail": "a1b2c3d4e5f6..." },
{ "hashedPhoneNumber": "f6e5d4c3b2a1..." }
]
}Note: Email and phone are automatically SHA256 hashed before sending. Only included if the respective identifier exists.
Event Specific Mappings
The page and order_completed events listed below are included in the default playbook.
page
| Output Key | Description | Expected Input |
|---|---|---|
conversionAction Required | String: Conversion action resource name. Format: customers/{CUSTOMER_ID}/conversionActions/{CONVERSION_ACTION_ID} | Expression - Formatted using your CUSTOMER_ID and CONVERSION_ACTION_ID |
conversionValue Required | Double: The value of the conversion | Enrichment - 1 |
order_completed
| Output Key | Description | Expected Input |
|---|---|---|
conversionAction Required | String: Conversion action resource name. Format: customers/{CUSTOMER_ID}/conversionActions/{CONVERSION_ACTION_ID} | Expression - Formatted using your CUSTOMER_ID and CONVERSION_ACTION_ID |
conversionValue Required | Double: The value of the conversion | properties.revenue |
currencyCode Required | String: Currency code (uppercased) | properties.currency |
orderId | String: Order ID (one per conversion action) | properties.order_id |
cartData.items | Array: Cart data with productId, quantity, unitPrice | Expression - Built from order properties |
Mapping Conversion IDs to Events
You must map your offline conversion event ID to each event:
- Open Event in the playbook.
- Select an event such as "page".
- Expand
conversionActionparameter. - In the
returnline, replaceADD_CONVERSION_ACTION_ID_HEREwith the corresponding offline conversion event ID.
Format: customers/{CUSTOMER_ID}/conversionActions/{CONVERSION_ACTION_ID}
Required & Recommended Identifiers
These identifiers must be mapped to Google Ads for successful user matching. Events without at least one identifier (gclid, email, or phone) are dropped.
| Attribute | Description | Example | Sync Injector Required? |
|---|---|---|---|
gclid Required* | Google Click ID | CjwKCAjwt-OwBhBnEiwAgwzrUkyN... | Yes |
conversionDateTime Required | Timestamp with timezone offset | 2019-01-01 12:32:45-08:00 | Yes (for timezone_offset) |
wbraid Recommended | iOS web-to-app identifier | ... | Yes |
userIdentifiers Recommended | Hashed email/phone (Enhanced Conversions) | [{hashedEmail: "..."}] | No |
*gclid is required unless Enhanced Conversions identifiers (email or phone) are provided.
Google Ads - Google Analytics 4 Path
Google Analytics 4 (GA4) offers an alternative method for importing conversion data into Google Ads. This approach leverages GA4's capabilities to transmit conversion data directly from your server-side environment.
Process
- Link GA4 and Google Ads: Ensure your GA4 property and Google Ads account are linked to enable data sharing. See here for instructions.
- Identify Relevant GA4 Events: In GA4, pinpoint the specific events that signify valuable user actions closely aligned with your Google Ads conversion goals.
- Import Events into Google Ads: Within Google Ads, navigate to the "Conversions" section and choose "Import." Select "Google Analytics 4 properties" and then pick the relevant GA4 events. See here for instructions.
- Configure Conversion Settings:
- Counting Method: Choose how to count conversions (every time, once per user)
- Conversion Window: Set the timeframe within which a conversion is valid after ad click
- Conversion Category: Categorize the conversion for reporting
Note: For GA4 integration details, see Google Analytics 4 - Measurement (recommended) or Google Analytics 4 - Collect.
Troubleshooting & Best Practices
Conversion Window Alignment
Problem: Events return EXPIRED_EVENT errors even though API call succeeds.
Cause: The gclid/dclid stored by the Gtag sync is older than the conversion window configured in Google Ads.
Solution: Set Gtag sync cookie lifetimes to match your Google Ads conversion window:
- If your Google Ads conversion window is 7 days, set cookie lifetimes to 7 days
- Cookie lifetimes are now configurable separately for gclid, dclid, and wbraid
- Default is 90 days, but customers with shorter conversion windows should reduce this
Important: Using a gclid older than your conversion window results in events being sent successfully (100% API delivery) but rejected by Google (~45%+ failure rate in dashboard).
Processing Delay Recommendations
Google recommends delaying conversion uploads to ensure identifiers are available for matching:
| Identifier | Recommended Delay |
|---|---|
gclid | ~1 hour after click |
dclid | ~1 hour after click |
matchId | ~2 hours after creation |
| General | 4-6 hours processing window |
To enable event delay: Contact your MetaRouter Customer Support Rep to configure delay for Google Ads conversions.
Without delay configured: MetaRouter uses a fail-then-retry pattern. Events are attempted immediately; if they fail, they're queued for retry.
Common Error Codes
| Error Code | Message | Cause | Fix |
|---|---|---|---|
EXPIRED_EVENT | "The imported event can't be recorded because its click occurred before this conversion's click-through window" | gclid/dclid older than conversion window | Reduce Gtag sync cookie lifetime to match conversion window |
UNAUTHORIZED_CUSTOMER | "The click ID or call is associated with an Ads account you don't have access to" | gclid belongs to a different Google Ads account | Verify gclid is from campaigns in the configured customer ID |
CLICK_NOT_FOUND | "The click associated with the given identifier was not found" | gclid doesn't exist or hasn't propagated | Wait 1+ hours after click before uploading; enable retry |
INVALID_CONVERSION_ACTION | "The conversion action specified is invalid" | Wrong conversion action ID | Verify conversion action ID in playbook mapping |
Additional Google Ads Documentation
Updated 19 days ago