Google Ads Sync (Decoupled)

What is Google Ads Sync?

The Google Ads sync fires conversion events to Google Ads via the gtag.js library. It sends conversion events with specific labels that can be tracked in your Google Ads account for attribution and optimization.


Considerations

  • Cookie Lifetime - GCLID, DCLID, and WBRAID cookie lifetimes are managed by the parent Google Tag Settings, not this sync. Set them to align with your Google Ads conversion window to avoid EXPIRED_EVENT errors.
  • Processing Delay - Google recommends delaying conversion uploads to ensure identifiers are fully available before delivery:
IdentifierRecommended Delay
gclid~1 hour after click
wbraid~1 hour after click
  • To enable event delay - Contact your MetaRouter Customer Support Rep to configure delay for Google Ads conversions (recommended: ~1 hour for gclid/dclid).
  • Partial Failure Responses - The Google Ads API returns HTTP 200 even when individual conversions fail. Errors such as EXPIRED_EVENT or UNAUTHORIZED_CUSTOMER appear in the response body and do not trigger automatic retry. Monitor response bodies or GCP logs to catch silent conversion failures. For a full list of error codes and fixes, see the Google Ads - Conversions documentation.
  • IAB TCF Consent - Enabling IAB TCF Consent requires an IAB TCF v2.0-compliant CMP with the __tcfapi JavaScript API exposed on the site, and Consent Policy set to "Explicit Consent" in MetaRouter Advanced Settings. Vendor ID is 755.
  • CMP Compatibility - This sync works with any CMP provided the consent categories are configured correctly in the MetaRouter UI.

Architecture Overview

  • Google Tag Settings serves as the parent and controls gtag.js library loading
  • Google Ads is a child sync with its own conversion event configuration
  • The sync sends conversion events via gtag('event', 'conversion', {...})
  • The parent gtag must be deployed before Google Ads sync can function
Google Tag Settings (Parent)
├── GTAG.js Tag ID
├── Load GTAG library
├── Load GTAG when zero consent granted
│
└── Syncs (Children)
    ├── Google Ads (sends conversion events)
    ├── Google Analytics 4 (optional)
    └── Google Campaign Manager 360 (optional)

Prerequisites

Before configuring the Google Ads sync:

  1. Parent Google Tag Settings must be configured — The parent controls gtag.js library loading and must be deployed first
  2. Google Ads account with conversion actions — You need your Ads ID (AW-XXXXXXX) and conversion labels

Configuration Fields

Parent Fields (Google Tag Settings)

FieldDescriptionRequired
GTAG.js Tag IDYour Google Ads ID (e.g., AW-XXXXXXX) or GA4 Measurement ID.No*
Load GTAG libraryToggle to load the gtag.js library. Must be ON for Google Ads sync to function.Yes
Load GTAG when zero consent grantedWhen ON, loads gtag even when no consent categories are granted.Yes

*GTAG.js Tag ID can be specified in the parent or in conversion events.


Google Ads Sync Fields

FieldDescriptionRequiredDefault
Consent TypeConsent category required before sync fires (e.g., C0004 - Targeting Sales).Yes
IAB TCF ConsentEnable IAB Transparency & Consent Framework integration. Vendor ID: 755.NoDisabled
ConversionsArray of conversion events to fire. Each with adsID and label.Yes

Conversions Array Format

[
  {
    "adsID": "AW-111111111",
    "label": "conversion_label_1"
  },
  {
    "adsID": "AW-111111111",
    "label": "conversion_label_2"
  }
]

Setup

1. Configure Parent Google Tag Settings

  1. From the Pipelines page, find the pipeline associated with your web property
  2. Hover over the three-dot dropdown and select "Build AJS File"
  3. In the Identity Syncs section, add Google Tag Settings
  4. Configure the parent fields:
    • GTAG.js Tag ID: Enter your Google Ads ID (e.g., AW-111111111) or leave blank
    • Load GTAG library: Set to ON
    • Load GTAG when zero consent granted: Set based on your consent requirements

2. Add Google Ads Sync

  1. Under the Syncs section within Google Tag Settings, add Google Ads
  2. Configure the sync fields:
  • Consent Type - Select the consent category required before the sync fires (typically C0004 - Targeting Sales for advertising).
  • IAB TCF Consent - Enable if using IAB TCF v2.0-compliant CMP. The Google Ads sync uses vendor ID 755.
  • Conversions - Enter your conversion events array:
[
  {
    "adsID": "AW-111111111",
    "label": "purchase_conversion"
  }
]

3. Save and Deploy

  1. Click Save and Build File
  2. Deploy your AJS file to propagate changes to your web property

Technical Details

Sync Behavior

The sync executes the following steps:

  1. Checks gtag.js availability (must be loaded by parent Google Tag configuration)
  2. Fires conversion events for each configured conversion:
gtag('event', 'conversion', {
  send_to: `${adsID}/${label}`  // e.g., "AW-111111/purchase_conversion"
});
  1. Stores marker to prevent duplicate firing

Storage Markers

Storage TypeKeyTTL
Cookie/IndexedDB[prefix]_googleAds_gtag_called365 days

Server-Side Enrichment

Adds to context.providers.googleAds:

{
  "googleAds": {
    "fired": "Wed Nov 27 2024 13:31:52 GMT+0300 (GMT+03:00)"
  }
}

Verification

  1. Check Browser Developer Tools:
    • Open Network tab and filter for googleadservices.com
    • Look for conversion requests with your Ads ID and label
    • Verify send_to parameter contains correct AW-XXXXXX/label format
  2. Check Cookies/Storage:
    • Look for [prefix]_googleAds_gtag_called marker
    • Verify marker is set after sync fires
  3. Check Google Ads Dashboard:
    • Navigate to Google Ads > Tools & Settings > Conversions
    • Check that conversions are being recorded (may take up to 24 hours)
  4. Server-side Event Validation:
    • Use MetaRouter's event debugger
    • Verify context.providers.googleAds.fired is present