> 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-id.md).

# Landing Page - How to add the tracking ID

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

**Step by Step to Add the Google Tag**

Adding the Google tag to your landing page is a simple but essential process to track your site's performance and collect valuable data. Follow the steps below to configure the tag correctly using an HTML container in SprintHub.

**Step 1: Copy the Google Tag Code**

First, you need to obtain the Google tag code you want to add to your site. This can be done via Google Tag Manager or directly from other Google platforms. In the provided example, the code is as follows:

{% hint style="info" %}
Remember that each Tag Manager account has a different code; you need to create your access to have a code similar to the example.
{% endhint %}

<figure><img src="https://docs.sprinthub.com/~gitbook/image?url=https%3A%2F%2F3534414179-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F9FzUKkagBNy5uQ7AtGNa%252Fuploads%252FCGGmJa4PFoHblj4QfxgV%252Fimage.png%3Falt%3Dmedia%26token%3De99dbea5-6c40-4560-bc60-687eb3b417cd&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=ed54877a&#x26;sv=1" alt=""><figcaption></figcaption></figure>

<pre class="language-html"><code class="lang-html"><strong>&#x3C;script async src="https://www.googletagmanager.com/gtag/js?id=AW-16533322872">&#x3C;/script>
</strong>&#x3C;script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'AW-16533322872');
&#x3C;/script>
</code></pre>

However we will add it to the LP separately:

**In the header:**&#x20;

<pre class="language-html"><code class="lang-html"><strong>&#x3C;script async src="https://www.googletagmanager.com/gtag/js?id=AW-16533322872">&#x3C;/script>
</strong></code></pre>

**In the Body:**

```html
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'AW-16533322872');
```

**Step 2: Access the Landing Page Editor in SprintHub**

**Access the Editor**: Navigate to the editor of your landing page in SprintHub.

**Select Custom Code**: In the editor, go to the right section and choose "Custom Code":

<figure><img src="/files/49e11b31a63589e2b997c19a58da0e68e3812225" alt=""><figcaption></figcaption></figure>

**Add the scripts to the Container**: open the advanced editor or select inside the text box, and paste the codes above.

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

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

**Verify the Connection**

Finally, use the "Test the connection" option to ensure the tag was set up correctly and is collecting data.

{% embed url="<https://tagassistant.google.com/>" %}

**Conclusion**

Adding the Google tag to your landing page is a simple task that can bring great benefits by allowing you to monitor and analyze your site's performance. By following these steps, you ensure the code is inserted correctly and begin collecting valuable data immediately.

***

**Note**: The provided images show the visual process of how to insert the tag in SprintHub's landing page editor. Make sure to follow the visual steps along with the textual guide for accurate implementation.


---

# 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-id.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.
