Google Tag Coupled Sync (Legacy)
New to Google Tag? See the Google Tag Overview for general information about gtag.js and architecture options.
This is the legacy coupled sync architecture. All three Google product configurations (GA4, CM360, Google Ads) are managed within a single sync. This architecture is deprecated—new implementations should use the decoupled sync.
What is the Coupled Google GTag Sync?
The coupled Google Gtag sync manages the gtag.js library lifecycle and handles GA4, CM360 Floodlight, and Google Ads configuration in a single sync. This sync:
- Loads and manages the gtag.js library
- Calls
gtag('config', ...)for each configured product - Captures attribution identifiers (gclid, dclid, wbraid) from URL parameters
- Configures Google Consent Mode across all products
- Enriches server-side events with identifiers via
context.providers.googleGtag
Considerations
- Conversion Window Alignment - GCLID, DCLID, and WBRAID cookie lifetimes should be set to match the conversion windows configured in Google Ads and CM360/DV360. Misalignment results in
EXPIRED_EVENTerrors — events are delivered successfully at the API level but rejected by Google with errors in the response body. - Google Ads Partial Failure Responses - The Google Ads API returns HTTP 200 even when individual conversions fail. Errors such as
EXPIRED_EVENTorUNAUTHORIZED_CUSTOMERappear in the response body underpartialFailureErrorand do not trigger automatic retry. Monitor response bodies directly or via GCP to catch silent conversion failures. - CM360 Retry Behavior - Unlike Google Ads, CM360 returns actual HTTP errors when conversions fail (e.g.,
NOT_FOUNDwhen an identifier is not yet available). These failures are automatically queued for retry by MetaRouter's retry mechanism. - Processing Delays - Google recommends delaying conversion uploads after identifier capture. Without a configured delay, CM360 relies on retry to recover from early delivery; Google Ads does not retry. Contact your MetaRouter Customer Support Rep to configure a delay at the integration level.
- IAB TCF Consent - Enabling IAB TCF Consent requires an IAB TCF v2.0-compliant CMP installed on the site with the
__tcfapiJavaScript API exposed, and the Consent Policy set to "Explicit Consent" in MetaRouter Advanced Settings. Vendor ID for CM360 and Google Ads is 755. - Consent Mode and CMP Compatibility - The decoupled sync architecture includes more robust handling of consent state changes and non-standard CMP configurations. Contact your MetaRouter Customer Support Rep if your site does not use OneTrust.
Architecture Overview
Google Gtag (Single Sync)
├── GTAG.js Tag ID (GA4 Measurement ID)
├── Destination IDs (optional — Google Ads AW-XXXXXX)
├── Floodlight Advertiser ID Object (optional — CM360)
├── Consent Mode Settings
├── Cookie Lifetime Settings
└── Session Settings (GA4)
Common Configuration Fields
These fields apply across all product configurations within this sync.
| Field | Description | Required | Default |
|---|---|---|---|
| GTAG.js Tag ID | Your GA4 Measurement ID (e.g., G-XXXXXXXXX). Found in GA4 Data Streams. Also accepts GT- and AW- formats. | Yes | — |
| Consent Type | Consent category required before sync fires. | Yes | — |
| IAB TCF Consent | Enable IAB TCF v2.0 integration. Vendor ID: 755. Prerequisites: Explicit Consent policy enabled; IAB TCF v2.0-compliant CMP installed; CMP exposes __tcfapi. | No | Disabled |
| Cookie Lifetime (in days) | General cookie expiration period. | Yes | 45 |
| Fire on Re-Sync | Re-triggers sync on identify() calls. | Yes | ON |
| Send MetaRouterSync to GA4 | Fires a MetaRouterSync event to GA4 for validation. | Yes | ON |
| Enable Google Consent Mode | Enables consent categories: ad_storage, ad_user_data, ad_personalization, analytics_storage. | Yes | OFF |
| Advanced Consent Mode Type | Advanced (ON) or basic (OFF) consent mode when consent mode is enabled. | Yes | ON |
| Create Session ID | Generates and manages GA4 session ID. | Yes | ON |
| GCLID Cookie Lifetime (in days) | Expiration for Google Click ID cookie. | No | 90 |
| DCLID Cookie Lifetime (in days) | Expiration for Display Click ID cookie. | No | 90 |
| WBRAID Cookie Lifetime (in days) | Expiration for WBRAID (iOS web-to-app) cookie. | No | 90 |
| Send MetaRouterReSync Event With Google Tag | Fires a re-sync event via Google Tag on re-sync. | No | ON |
Product-Specific Configuration
GA4
No additional GA4-specific fields beyond the common fields above. GA4 tracking is enabled by the GTAG.js Tag ID (G-XXXXXXXXX) in the common fields.
CM360 Floodlight
| Field | Description | Required | Default |
|---|---|---|---|
| Floodlight Advertiser ID Object | JSON array of Floodlight advertiser configurations (see format below). | Yes | — |
| DCLID Cookie Lifetime (in days) | Expiration for Display Click ID cookie used for DV360/CM360 attribution. | No | 90 |
Cookie Lifetime Best Practice: Set DCLID Cookie Lifetime to align with your CM360/DV360 attribution window.
Floodlight Advertiser ID Object format - This field controls which Floodlight activities the MetaRouter sync fires as conversion events—specifically to register the MetaRouter anonymous ID (matchId) with CM360 at the moment of the page visit, so it can later be matched against server-side conversion events. Only include activities designated for this sync-time ID capture.
[
{
"group": "teamint",
"activityTag": "syncn0",
"advertiserID": "14780324"
},
{
"group": "page",
"activityTag": "pagei0",
"advertiserID": "14780324",
"matchIDEnumKey": "u53"
}
]Note: Only include Floodlight activities used for syncing purposes—do not add all Floodlight activities.
| Field | CM360 Location | Notes |
|---|---|---|
activityTag | "Activity Tag String" column | Required |
advertiserID | Your CM360 Advertiser ID | Works with or without DC- prefix |
group | "Group Tag String" column | Required |
matchIDEnumKey | Custom Floodlight variable (e.g., u53) | Optional |
Google Ads
| Field | Description | Required | Default |
|---|---|---|---|
| Destination IDs | JSON array of Google Ads Conversion Tracking IDs. Format: ["AW-123456789"]. | No | [] |
Best Practice — Conversion Window Alignment: Set cookie lifetimes to match your Google Ads conversion window. Using a gclid older than your conversion window results in EXPIRED_EVENT errors. See Google Ads - Conversions troubleshooting for details.
Setup
- From the Pipelines page, find the pipeline for your web property
- Hover over the three-dot dropdown and select "Build AJS File"
- In the Identity Syncs section, add Google Gtag
- Configure the Common Configuration Fields above
- Configure fields for each Google product you are enabling (GA4, CM360, Google Ads)
- Click Save and Build File
- Deploy your AJS file to propagate changes
Technical Details
Sync Behavior
- Loads and manages the gtag.js library
- Calls
gtag('config', ...)for each configured product withuser_idandpage_referrer - Captures attribution identifiers (
gclid,dclid,wbraid) from URL parameters - Creates/retrieves GA4 client ID and session information (when GA4 is configured)
- Fires Floodlight conversion events (when CM360 is configured)
- Fires
MetaRouterSyncevent to GA4 (when enabled) - Re-triggers on
identify()calls when Fire on Re-Sync is enabled - Applies Google Consent Mode when enabled
Storage Markers
| Storage Type | Key | TTL | Description |
|---|---|---|---|
| Cookie | _ga | 400 days | GA4 client ID |
| Cookie | _ga_{tagID} | 400 days | Property-specific GA4 client ID |
| Cookie | _gcl_aw | Configurable (default 90 days) | Google Click ID |
| Cookie | _gcl_dc | Configurable (default 90 days) | Display Click ID |
| Cookie | _gcl_gb | Configurable (default 90 days) | WBRAID (iOS web-to-app) |
| Cookie | _gcl_au | 90 days | Google Ads conversion linker |
| Cookie | _meta_CM360_gtag_called | 365 days | CM360 sync execution marker |
| IndexedDB | [prefix]_googleGtag_ga_library_loaded | syncFrequency | Library load marker |
Server-Side Enrichment
Adds to context.providers.googleGtag:
{
"googleGtag": {
"data": {
"clientID": "1234567890.1234567890",
"sessionID": "1595262825000",
"sessionCount": 3,
"gclid": "CjwKCAjwt-OwBhBnEiwAgwzrUkyN...",
"dclid": "CKDdz-fE_IUDFYtTCQkdbyMOPg",
"wbraid": "...",
"timezone_offset": "-300"
}
}
}Fields populated depend on which products are configured and which identifiers are present on the page.
Processing Delay Recommendations
Google recommends delaying conversion uploads to ensure identifiers are fully available:
| Identifier | Recommended Delay |
|---|---|
matchId | ~2 hours after Floodlight call |
dclid | ~1 hour after click |
gclid | ~1 hour after click |
wbraid | ~1 hour after click |
To enable event delay: Contact your MetaRouter Customer Support Rep to configure a delay for conversions.
Without delay configured: CM360 uses a fail-then-retry pattern — events that fail due to identifier unavailability (NOT_FOUND) are automatically queued for retry. Google Ads returns HTTP 200 with errors in the response body and does not automatically retry.
Verification
GA4
- Network tab: filter for
google-analytics.com, look forMetaRouterSyncevent requests - Cookies: confirm
_gacookie is present - GA4 Realtime: verify events appear with correct client IDs
- MetaRouter event debugger: confirm
context.providers.googleGtag.data.clientIDandsessionID
CM360
- Network tab: filter for
googleadservices.comordoubleclick.net, look for conversion requests with Floodlight activity IDs andmatch_id - Cookies: confirm
_gcl_dccookie and_meta_CM360_gtag_calledmarker - CM360 Dashboard: check Floodlight reporting (may take up to 2 hours)
- MetaRouter event debugger: confirm
context.providers.googleGtag.data.dclid
Google Ads
- Network tab: filter for
googleadservices.com, look for config calls with your Ads ID - Cookies: confirm
_gcl_aw(gclid) and_gcl_gb(wbraid) cookies - MetaRouter event debugger: confirm
context.providers.googleGtag.data.gclid
Updated about 15 hours ago