Who does what: the platform versus the GTM console
Google Tag Manager is a container for tags, not a measurement product, so the scope of the integration is narrow on purpose. The platform does three things: it loads the right container on the right channel’s storefront, pushes a fixed set of commerce events to dataLayer and, if you want it to, delivers those events from the backend to a server container.
It does not mirror your tags, triggers or variables, and it has no say in which vendors your container sends data to. That stays with your marketing team or agency.
Configuration per sales channel
The integration has no admin screen of its own. It consists of six settings in the “Google Tag Manager” group on the general settings screen, each of which can be overridden for a single sales channel: the master switch, the container ID, the consent requirement, the server-side tagging switch, and the server container URL and path. Access is governed by the standard settings read and write permissions, and changes are recorded in the audit log.
A channel is tracked only when the switch is on and the ID has the GTM-XXXXXXX shape. A blank or malformed ID means “not configured” rather than a broken script on the page, so clearing the field is a safe way to pause measurement on one channel. Changes take effect immediately, with no deployment.
On the Google side you need a GTM account and a web container with its ID, plus a running server container if you want server-side tagging.
The data layer event vocabulary
Trigger your tags on the custom events below. The items parameter uses the item shape recommended by GA4 (item_id, item_name, price, quantity) and is passed as a JSON string.
| Event | When |
|---|---|
page_view | a page is viewed |
view_search_results | search results |
view_item | product page |
add_to_cart | item added to the cart |
add_to_quote_request | line added to a quote request |
add_to_shopping_list | item added to a shopping list |
begin_checkout | checkout started |
place_order_clicked | the place-order button is clicked |
purchase | order placed |
contact_form_submitted | contact form sent |
Payloads carry scalar values only, so a form attachment can never end up in one.
The two things that are easiest to get wrong:
- Do not use the History Change trigger. The storefront pushes exactly one
page_viewper destination, including navigations that do not reload the document. The built-in history change trigger would count every navigation a second time. - One route to GA4 per channel. A GA4 tag in the container and the native Google Analytics 4 integration enabled on the same channel report the same actions, so metrics double. The platform cannot see inside your container and will not block this: pick one route.
Scroll depth, outbound link clicks, file downloads, element visibility and timers remain the container’s own business. The platform does not publish them because they depend on browser state.
Consent and Consent Mode v2
Consent is a single storefront decision, shared with GA4, Meta Ads and LinkedIn Ads: one banner and one stored answer. With the consent requirement on (the default):
- Before the container loads, the page sets the Consent Mode v2 defaults to
deniedforanalytics_storage,ad_storage,ad_user_dataandad_personalization. - The container loads anyway. Withholding it would silently disable the tags that never needed consent as well.
- The platform sends no events of its own until the visitor accepts.
- Accepting mid-session passes a consent update to the container and starts the events flowing, with no page reload.
One important caveat: Consent Mode governs Google tags. A Meta, LinkedIn or custom HTML tag placed in the container fires regardless of the consent state unless you add an extra condition to it in the GTM console. That is the container owner’s responsibility.
Server-side tagging: one route per event
Once server-side tagging is on and a container URL is set, the ten events in the table stop being pushed to dataLayer in the browser and are delivered from the platform’s backend instead. Each event is reported exactly once, never down both paths at the same time, because double-firing quietly inflates purchase counts and revenue in every report downstream. A blank container URL keeps the channel on the browser path even with the switch on.
The storefront hands events to a queue, and a separate process posts them to the container and retries failed attempts: eight times, with increasing delay. The call does not happen inside the buyer’s request, so a slow or unavailable container does not slow the shop down. Exhausted attempts remain visible as failed jobs.
What you need to do on your side:
- run a server container and add a client in it that claims the configured path (
/databy default), - rebuild, in the server container, the tags that used to trigger on commerce events in the web container,
- parse
itemsas JSON and deduplicate onevent_id, which is stable across retries, - handle a missing IP address and user agent: they are not sent when consent was denied.
The request carries only the event parameters, page context, client ID, consent state and event ID. It contains no e‑mail address, no user or organization ID, no postal address and no hashed identifiers.
What the integration does not cover yet
Serving the gtm.js script from your own domain through the server container, and passing user_id and enhanced conversions in the relay, are not implemented at present. If your container needs them, you add the data on your side.