---
title: "Academy Article"
canonical_url: "https://academy.laioutr.com/en/artikel/set-up-tracking-connect-google-tag-manager"
locale: en
meta:
  "og:title": "Academy Article"
---

[Go to home](https://academy.laioutr.com/en)

- [Storefront features](https://academy.laioutr.com/en/bereiche/storefront-features)

- [Tracking, language and agents](https://academy.laioutr.com/en/leitfaeden/tracking-language-and-agents)

- [Set up tracking: connect Google Tag Manager](https://academy.laioutr.com/en/artikel/set-up-tracking-connect-google-tag-manager)

# Set up tracking: connect Google Tag Manager

To set up tracking, install a consent app and the Google Tag Manager app, enter the container ID per environment and deploy. Storefront events then arrive in the data layer with GA4 names as soon as the visitor consents to statistics.

## Before you start

<dl>

<dt>Plan</dt>
<dd>Tracking base included in the platform; Server Side Tracking is an add-on</dd>

<dt>Role</dt>
<dd>Developer role on the environment (for Configuration)</dd>

<dt>Duration</dt>
<dd>10 min</dd></dl>

### Prerequisites

- Google Tag Manager account with a container (GTM-XXXXXX)
- Consent app Cookiebot or CCM19 set up
- Access to a test environment such as dev or stage

Last reviewed on October 15, 2026

Laioutr captures events such as page view, product view, add to cart and purchase in a central analytics layer. To get these events into Google Analytics, Google Ads or other tools, a destination is connected. The ready-made destination for this is the **Google Tag Manager** app.

The app loads the GTM container and writes the events to the data layer. It translates event names into GA4 names, so the cart event becomes `add_to_cart`, for example, and converts amounts into the usual currency format. Nothing is sent until the visitor consents to statistics.

The app also drives **Google Consent Mode v2**: before GTM loads, every signal is set to denied, and after the visitor decides a complete update follows. Without a consent solution everything stays denied, so a consent solution such as Cookiebot, CCM19 or Consentr is always part of the setup.

This tracking base is included in the platform. Server-side forwarding to further destinations is provided by the Server Side Tracking add-on.

## Step by step

1. 1 ### Step 1: Set up the consent app

   Install and configure Cookiebot or CCM19 first. Without a consent app, every consent stays denied and tracking sends nothing.
2. 2 ### Step 2: Install the Google Tag Manager app

   In Cockpit, open **Apps** in the project menu, select the **Tracking** tab and click **Install** on Google Tag Manager.
3. 3 ### Step 3: Enter the container ID

   In the environment, open the app under **Configuration** and enter the container ID from Google Tag Manager. With several markets, each market can get its own container.
4. 4 ### Step 4: Save and deploy

   Click **Save settings**, then start a deployment of the environment. Saved settings only take effect with the next deployment.
5. 5 ### Step 5: Create tags in Google Tag Manager

   In the GTM container, create tags and triggers for the GA4 event names, for example `page_view`, `view_item`, `add_to_cart` and `purchase`.
6. 6 ### Step 6: Test first, then go live

   Check the setup in dev or stage first. Then enter the same container ID or the live container in main and deploy.

## Check the result

Open the storefront in a private browser window, consent to statistics in the banner and check in Google Tag Manager preview mode that events such as `page_view` and `add_to_cart` reach the data layer. After a refusal, no events may appear.

## Frequently asked questions

Why do no events arrive in Google Tag Manager?

Common causes: no consent app is installed, the visitor has not consented to statistics, or the environment was not redeployed after saving.

Can each market have its own GTM container?

Yes. The container ID can be set per market. A market without an entry then gets no container.

Can custom events be added?

Yes. Developers define custom event types in an app. The GTM app passes them to the data layer with their namespace, for example as `acme_quote_requested`.

How are events forwarded server-side?

With the Server Side Tracking add-on. It forwards events without browser JavaScript to destinations such as GA4, Meta or a data warehouse, still controlled by consent.

## Related

- [Tracking and consent built into the components](https://academy.laioutr.com/en/artikel/tracking-and-consent-built-into-the-components)6 min

  Laioutr components send events such as page view, product view, add to cart and purchase through one analytics layer. Each event only reaches the destinations the visitor has consented to.
- [Set up a consent banner with Cookiebot or CCM19](https://academy.laioutr.com/en/artikel/set-up-a-consent-banner-with-cookiebot-or-ccm19)10 min

  Laioutr connects Cookiebot or CCM19 as a consent app. Once installed and configured with its IDs, the storefront shows the banner, and all tracking destinations and Google Consent Mode v2 follow the visitor's decision automatically.
- [Enter credentials and test the connection](https://academy.laioutr.com/en/artikel/enter-credentials-and-test-the-connection)5 min

  App credentials are entered per environment under Configuration, checked with Test connection and stored with Save settings. They take effect with the next deployment.
- [Add Google Tag Manager with Consent Mode v2](https://academy.laioutr.com/en/apps/google-tag-manager-with-consent-mode-v2)8 min

  The Google Tag Manager app loads the GTM container into the storefront, sets all consent signals to "denied" up front and releases them only after visitors decide. After analytics consent, storefront events reach the data layer with GA4 names.

## [Tracking, language and agents](https://academy.laioutr.com/en/leitfaeden/tracking-language-and-agents)

Search this guide

1. [Tracking and consent built into the components](https://academy.laioutr.com/en/artikel/tracking-and-consent-built-into-the-components)6 min
2. [Set up tracking: connect Google Tag Manager](https://academy.laioutr.com/en/artikel/set-up-tracking-connect-google-tag-manager)10 min
3. [Set up a consent banner with Cookiebot or CCM19](https://academy.laioutr.com/en/artikel/set-up-a-consent-banner-with-cookiebot-or-ccm19)10 min

## Structured Data

```json
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@id": "https://academy.laioutr.com/#website",
      "@type": "WebSite",
      "inLanguage": "en",
      "name": "Default",
      "url": "https://academy.laioutr.com/",
      "translationOfWork": {
        "@id": "https://academy.laioutr.com/#website"
      }
    },
    {
      "@id": "https://academy.laioutr.com/en/artikel/set-up-tracking-connect-google-tag-manager#webpage",
      "name": "Academy Article",
      "url": "https://academy.laioutr.com/en/artikel/set-up-tracking-connect-google-tag-manager",
      "@type": [
        "WebPage",
        "FAQPage"
      ],
      "breadcrumb": {
        "@id": "https://academy.laioutr.com/en/artikel/set-up-tracking-connect-google-tag-manager#breadcrumb"
      },
      "isPartOf": {
        "@id": "https://academy.laioutr.com/#website"
      },
      "mainEntity": [
        {
          "@id": "https://academy.laioutr.com/en/artikel/set-up-tracking-connect-google-tag-manager#/schema/question/1"
        },
        {
          "@id": "https://academy.laioutr.com/en/artikel/set-up-tracking-connect-google-tag-manager#/schema/question/2"
        },
        {
          "@id": "https://academy.laioutr.com/en/artikel/set-up-tracking-connect-google-tag-manager#/schema/question/3"
        },
        {
          "@id": "https://academy.laioutr.com/en/artikel/set-up-tracking-connect-google-tag-manager#/schema/question/4"
        }
      ],
      "potentialAction": [
        {
          "@type": "ReadAction",
          "target": [
            "https://academy.laioutr.com/en/artikel/set-up-tracking-connect-google-tag-manager"
          ]
        }
      ]
    },
    {
      "@id": "https://academy.laioutr.com/en/artikel/set-up-tracking-connect-google-tag-manager#breadcrumb",
      "@type": "BreadcrumbList",
      "itemListElement": [
        {
          "@type": "ListItem",
          "name": "Home",
          "item": "https://academy.laioutr.com/en",
          "position": 1
        },
        {
          "@type": "ListItem",
          "name": "Storefront features",
          "item": "https://academy.laioutr.com/en/bereiche/storefront-features",
          "position": 2
        },
        {
          "@type": "ListItem",
          "name": "Tracking, language and agents",
          "item": "https://academy.laioutr.com/en/leitfaeden/tracking-language-and-agents",
          "position": 3
        },
        {
          "@type": "ListItem",
          "name": "Set up tracking: connect Google Tag Manager",
          "item": "https://academy.laioutr.com/en/artikel/set-up-tracking-connect-google-tag-manager",
          "position": 4
        }
      ]
    },
    {
      "@id": "https://academy.laioutr.com/en/artikel/set-up-tracking-connect-google-tag-manager#/schema/question/1",
      "@type": "Question",
      "inLanguage": "en",
      "name": "Why do no events arrive in Google Tag Manager?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "<p>Common causes: no consent app is installed, the visitor has not consented to statistics, or the environment was not redeployed after saving.</p>"
      }
    },
    {
      "@id": "https://academy.laioutr.com/en/artikel/set-up-tracking-connect-google-tag-manager#/schema/question/2",
      "@type": "Question",
      "inLanguage": "en",
      "name": "Can each market have its own GTM container?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "<p>Yes. The container ID can be set per market. A market without an entry then gets no container.</p>"
      }
    },
    {
      "@id": "https://academy.laioutr.com/en/artikel/set-up-tracking-connect-google-tag-manager#/schema/question/3",
      "@type": "Question",
      "inLanguage": "en",
      "name": "Can custom events be added?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "<p>Yes. Developers define custom event types in an app. The GTM app passes them to the data layer with their namespace, for example as <code>acme_quote_requested</code>.</p>"
      }
    },
    {
      "@id": "https://academy.laioutr.com/en/artikel/set-up-tracking-connect-google-tag-manager#/schema/question/4",
      "@type": "Question",
      "inLanguage": "en",
      "name": "How are events forwarded server-side?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "<p>With the Server Side Tracking add-on. It forwards events without browser JavaScript to destinations such as GA4, Meta or a data warehouse, still controlled by consent.</p>"
      }
    }
  ]
}
```
