Skip to main content

Connect the correct Google Tag Manager container to the store

Learn how to create a Google Tag Manager account, set up a container, and connect it to your online store.

Gather the store's tags in the correct container and control the measurement without duplicate purchases or conflicting consent settings.

This guide is for store administrators and those responsible for measurement. It applies to Diversity themes with the Google add-on in Go, Plus, and Pro. Google Tag Manager requires a Google account and the correct permissions. These instructions should not be used as a general installation guide for older TPL or custom themes that lack these settings.

1. Find an existing account and the correct container

First, check if the store already has a GTM container. Ask the responsible agency or colleague for access to it instead of creating a competing installation. Ensure that the store owner has permanent access. Having a Google account does not automatically grant permission to the company's container.

In GTM, a container is the collection of tags, triggers, and variables. A tag sends or processes data. A trigger specifies when it should run, and a variable provides, for example, a transaction ID or order value.

2. Create a web container if one is missing

  1. Open Google Tag Manager with the company's designated Google account.

  2. Create an account if the organization doesn't already have one and create a container with a clear name for the store.

  3. Select the target platform Web.

  4. Copy the container ID that starts with GTM-. It is not a GA4 ID that starts with G- and not an Ads ID that starts with AW-.

GTM container code

3. Add the ID to the active theme

  1. Go to Appearance → Themes. Check which theme and version are active in the current store or sub-store.

  2. Open Edit → Add-ons → Google → Google Tag Manager.

  3. Enter the GTM ID in the Tag Manager field and save. Do not paste Google's full script block into this ID field.

  4. Check for any domain-specific Google settings. A specific ID for the domain can be used instead of the general one.

If you change containers, first document the existing ID, tags, consent settings, and measurement responsibilities. A new ID does not automatically move tags and history from the old container. Verify the change in the correct store before it goes live.

4. Configure tags and consent

Adding the container ID does not automatically install all desired Analytics, Ads, or other tags. These are configured in GTM with the correct triggers and variables.

The Diversity theme's Google flow sets default consent values before Google tags are loaded and updates them when the visitor makes a choice. However, each tag must be correctly configured for its consent requirements. Custom HTML tags and other vendors' scripts do not automatically follow all rules just because they are in GTM.

Check if the same GA4 or Ads measurement is also enabled directly in the theme or through another script. Choose one intended path for the same purchase measurement; duplicate installations can result in duplicate events. Server-side tagging is a separate setup and is not created by entering a standard web container's GTM ID here.

5. Check before publishing the GTM version

  1. Use Preview in GTM and connect Tag Assistant to the correct domain.

  2. Confirm that the correct container is loading and that the correct tags are firing on the intended events.

  3. Check without a consent choice, after denial, and after consent. Also check that choices can be changed again.

  4. Check purchase measurement, transaction ID, value, and currency with an authorized test flow. Do not count both the older purchase and purchase_GA4 as two different purchases.

  5. Publish the reviewed GTM version and check the regular store again.

If nothing appears: check the container ID, active theme, correct domain, and the published GTM version. An ad blocker can affect the test; an empty Preview result does not in itself prove a store error. A theme that is only being previewed is not proof that the public store uses the same settings.

Quick start

  1. Reuse the company's existing container or create a Web container.

  2. Enter the GTM ID in the correct active theme.

  3. Configure tags and consent without duplicate measurement paths.

  4. Test in Preview, publish the intended GTM version, and check the store.

Subscription

Go, Plus, and Pro can use the Google extension in themes that support it. The Google account's permissions and the theme's actual features determine if this guide is applicable. Check the active theme again after a theme change.

Tablet with the Google search page next to a keyboard
Did this answer your question?