> 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="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FV6PDsKsdTySX2pZJcWBJ%2Fundraw_text_files_au1q.png?alt=media&amp;token=a5a96c87-0c05-46c1-9467-7dc73e3fb619" 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 for tracking your site's performance and collecting valuable data. Follow the steps below to configure the tag correctly using an HTML container in SprintHub.

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

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

{% hint style="info" %}
Remember that each Tag Manager account has a different code; you need to create your own access to get 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: Accessing the Landing Page Editor in SprintHub**

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

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

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FGBfrlcc6y6zBaogjW9HK%2Fimage.png?alt=media&amp;token=25c4b298-581b-4a39-8392-f6d7aa5abc51" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FkSs1JI0oHGQslRhqxUoB%2Fimage.png?alt=media&amp;token=a7e119aa-ee15-4de7-a6fc-0bc5c6e32808" alt=""><figcaption></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FYMRKu1HnUnRqggudqA47%2Fimage.png?alt=media&amp;token=41d5d524-cdc1-406c-b42f-36840edf4c2e" alt=""><figcaption></figcaption></figure>

**Verify the Connection**

Finally, use the "Test the connection" option to ensure the tag has been configured 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. Following these steps, you ensure that the code is inserted correctly and begins collecting valuable data immediately.

***

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