> For the complete documentation index, see [llms.txt](https://docs.edgetag.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.edgetag.io/channels/google-tag-manager/onboarding.md). Agents can also search and read this documentation through its [MCP server](https://docs.edgetag.io/~gitbook/mcp).

# Onboarding

Google Tag Manager channels provide a straightforward setup process that uses a Container ID to link your GTM container to EdgeTag. This connection enables your site to stream events into Google Tag Manager's dataLayer, providing powerful tag management capabilities. Let's walk through the steps.

### Video Guide

{% embed url="<https://www.loom.com/share/65e65071560b42c79b23d086c401302b>" %}

### Add Channel

To add a channel, enter the channel's name. We recommend choosing a name that clearly describes the channel you are adding. This will assist with debugging if any issues arise. Once you have entered the name, we need to get the Container ID from the GTM dashboard.

{% hint style="info" %}
If you are looking to create a new GTM container and configure it with EdgeTag, please follow the instructions below to connect an existing GTM Container with EdgeTag or create a new GTM container.
{% endhint %}

### Container ID Setup

Log in to the Google Tag Manager dashboard at [tagmanager.google.com](https://tagmanager.google.com). Select the correct account and container you want to use with EdgeTag.

#### Finding Your Container ID

1. In the GTM dashboard, select your workspace.

2. Your Container ID will be displayed in the top section of the workspace, usually in the format `GTM-XXXXXXX`\
   \
   \ <br>

   <figure><img src="https://1474399258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZJWZKbUk0hRISkCIj2p4%2Fuploads%2FGfXe9DnxkovFC2jCNUIR%2FScreenshot%202025-09-22%20at%203.28.37%E2%80%AFPM.png?alt=media&amp;token=aaebbcee-a999-4fff-b8b4-31b748a5f9ce" alt=""><figcaption></figcaption></figure>

3. Copy this Container ID

### Creating a New Container (Optional)

If you need to create a new container:

1. Click on the **account** drop-down in the top navigation&#x20;
2. Select "**Create Container**"   &#x20;

   <figure><img src="https://1474399258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZJWZKbUk0hRISkCIj2p4%2Fuploads%2FeRcx3CYPKocdclRAA2T3%2FScreenshot%202025-09-22%20at%203.26.49%E2%80%AFPM.png?alt=media&amp;token=b5ff2bda-b5b8-4db8-896f-ab28521ae532" alt=""><figcaption></figcaption></figure>
3. Enter a container name (e.g., "EdgeTag Production")&#x20;
4. Select "Web" as the target platform&#x20;

   <figure><img src="https://1474399258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZJWZKbUk0hRISkCIj2p4%2Fuploads%2FoYOZWy3R2ApGOwJhBkdx%2FScreenshot%202025-09-22%20at%203.27.10%E2%80%AFPM.png?alt=media&amp;token=c78152ab-1326-4b22-9562-d97570cc21b0" alt=""><figcaption></figcaption></figure>
5. Click "**Create**"
6. Accept the Terms of Service
7. Copy the Container ID from the newly created container

### Configure in EdgeTag

1. Return to the EdgeTag channel form
2. Paste your GTM Container ID in the "GTM Container ID" field

   <figure><img src="https://1474399258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZJWZKbUk0hRISkCIj2p4%2Fuploads%2Fs5huZ0Ym14rqUJg4uWgl%2FScreenshot%202025-09-22%20at%203.56.45%E2%80%AFPM.png?alt=media&amp;token=ebd4b1c4-5f4d-491f-b32b-eefbcac4df06" alt=""><figcaption></figcaption></figure>
3. Click **"Save & Deploy"**

Your GTM integration is now active! Events will start flowing to your GTM dataLayer, where you can configure tags, triggers, and variables to handle the data.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.edgetag.io/channels/google-tag-manager/onboarding.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
