Google Tag
What is Google Tag?
The Google tag is a single tag you add to your website to use multiple Google products and services (GA4, Google Ads, CM360) from one implementation, rather than managing separate tags for each product.
Terminology Note: "Google tag" is the current product name (formerly called "global site tag"). The underlying JavaScript library is
gtag.js. You may see both terms used interchangeably, and they refer to the same technology.
The Google tag sends data from your website to Google product destinations for measuring website and ad effectiveness. A "Google tag" screen in Google Ads and Google Analytics lets you access measurement features without adding code after the initial setup. Settings changes in the Google tag apply to all associated destinations.
Important: As website technologies (e.g., cookies) continue to change due to privacy, browser, or regulation changes, having high-quality, site-wide tagging is critical for accurate measurement.
How Google Tag Works with MetaRouter
MetaRouter syncs certain IDs — Google Click IDs, first-party IDs, and Measurement ID — as minimally as possible to preserve the benefits of the GTag. MetaRouter stores Client IDs as first-party cookies. If MetaRouter does not find the cookie, it creates a Client ID that fires a GTag first-party library sync. MetaRouter then stores the created Client ID as a first-party cookie and sends it along with events.
Key Benefit: After IDs are synced and persisted client-side, MetaRouter eliminates redundant GTag library loads on subsequent page views. The library only reloads when IDs expire, cookies are cleared, or the Analytics.js configuration changes — reducing network overhead and improving page performance.
MetaRouter's sync supports the following Google identifiers: Client ID (client_id), User ID (user_id), Google Click ID (gclid), DoubleClick Click ID (dclid), and Match ID (match_id). To maintain full GTag functionality, all account IDs for Google Ads, Google Analytics (GA4), and CM360 must be added to the MetaRouter UI.
Note: Google recommends websites have only one Google tag. Multiple tags can cause performance issues and maintenance complexity.
Configuration Options
Send MetaRouterSync to GA4
Default is set to ON and should remain that way for any client that is not fully aware of the selection. We are leaving the MetaRouterSync on by default as we send the User ID (user_id) when you add an AW ID in the UI to create a match table. The option to turn it off will load the gtag and its config on first page load but will not fire the MetaRouterSync event with the User ID and ajs id. We will send these IDs as events are passed but it will not be on first page load.
Enable Google Consent Mode
Google has set new requirements in the EU that require sending opt-out consent if a user opts out vs. not just firing the tag. EU users should enable the consent mode so that they do not lose access to Google's ad networks. With the Consent Mode turned on, we will load the tag on an opt-out consent signal from the consent module and send the opt-out signal to Google.
Sync Architecture: Decoupled vs Coupled
MetaRouter offers two architectures for configuring Google Tag syncs:
| Aspect | Decoupled | Coupled |
|---|---|---|
| Structure | Parent Google Tag Settings with separate child syncs for each product | Single Google GTag sync bundling all products together |
| GTag Library | Managed by parent Google Tag Settings | Managed within the single sync |
| Product Configuration | Each product (GA4, Google Ads, CM360) configured independently | All products configured in one place |
| Flexibility | Add/remove individual products without affecting others | Changes affect all bundled products |
Decoupled Architecture
In the decoupled architecture, Google Tag Settings serves as a parent that controls gtag.js library loading, with individual syncs for each Google product configured as children.
Google Tag Settings (Parent)
├── GTAG.js Tag ID
├── Load GTAG library
├── Load GTAG when zero consent granted
│
└── Syncs (Children)
├── Google Campaign Manager 360 (CM360)
├── Google Ads
└── Google Analytics 4 (GA4)
Product-Specific Documentation:
Coupled Architecture
In the coupled architecture, a single Google GTag sync bundles GA4, Google Ads, and CM360 Floodlight together, managing the gtag.js library lifecycle internally.
Google GTag (Single Sync)
├── GTAG.js Tag ID (GA4/Google Ads)
├── Destination IDs
├── Floodlight Advertiser ID Object (CM360)
├── Consent Mode Settings
├── Cookie Lifetime Settings
└── Session Settings
Product-Specific Documentation:
Updated 8 days ago