> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/topics/attract/landing-page/landing-page-google-tag-manager/landing-page-how-to-add-the-tracking-script-to-the-google-tag-manager-container.md).

# Landing Page - How to Add the Tracking Script to the Google Tag Manager Container

<figure><img src="/files/89daed91b788f26e66f6d645dac62c0825b55e3a" alt=""><figcaption></figcaption></figure>

Integrating tracking scripts into a landing page is crucial for monitoring visitor behavior and optimizing marketing strategies. Below is a step-by-step guide to add a specific tracking script to the Google Tag Manager (GTM) container.

{% hint style="info" %}
This article applies to any external site.
{% endhint %}

**1. Access Google Tag Manager**

* First, log in to your Google Tag Manager account and select the container where you want to add the script.

<figure><img src="/files/27e86f4e201c8b8d6cb07d38047d32d5e6ce5ccd" alt=""><figcaption></figcaption></figure>

**2. Create a New Tag**

* In the GTM dashboard, go to the **"Tags"** section in the left menu and click the **"New"** button to create a new tag.

<figure><img src="/files/99d35d9c943d01391be2117d08c3c679efe9e9fa" alt=""><figcaption></figcaption></figure>

**3. Tag Configuration**

A new window will open with the options for **"Tag Configuration"** and **"Triggering"**.

<figure><img src="/files/4858cab3001089c7872d60bfdad422192f91081f" alt=""><figcaption></figcaption></figure>

Click **"Tag Configuration"** and select the option **"Custom HTML Tag"**.

<figure><img src="/files/194a5d922a585db34c56554010af541ae289840e" alt=""><figcaption></figcaption></figure>

A trigger is also required to activate the container script; the correct trigger is **"All Pages"**

<figure><img src="/files/aa4abcb8391994ffb62d5c7d9b207d5e55392b01" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/427f1855363a77e4189bcd1c3acb5d0755d0afb0" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/0a5543695e3130e36f98af3826369d3fac60e976" alt=""><figcaption></figcaption></figure>

After completing this process, just install the Tag Manager on your external landing page, which will add tracking for the leads who visit the site.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sprinthub.com/en/topics/attract/landing-page/landing-page-google-tag-manager/landing-page-how-to-add-the-tracking-script-to-the-google-tag-manager-container.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
