> 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-google-tag-to-your-landing-page-in-sprinthub.md).

# Landing Page - How to Add the Google Tag to Your Landing Page in SprintHub

<figure><img src="/files/31496513bfe1a4ca0a83b1241c73778e91e7ffc4" alt=""><figcaption></figcaption></figure>

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.

{% embed url="<https://support.google.com/tagmanager/answer/6102821?hl=en>" %}

#### 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:

<figure><img src="/files/1f29bbf209f1a38817aa5cc34c58329b1505d984" alt=""><figcaption></figcaption></figure>

However in our LP, we will do the opposite process:

**In the header:**

```html
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PWFP2HMS"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
```

#### In the Body:

```html
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-PWFP2HMS');</script>
<!-- End Google Tag Manager -->
```

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

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

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

To insert the code, you need to click on custom code where it will be made available to add your own codes to the page:

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

**Insert the Code**: add the script to the header via the advanced editor:

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

#### Step 4: Publish the Landing Page

After inserting the code, review your landing page to ensure everything is correct. Then publish the landing page so the Google tag code starts working.

#### Verify the Connection

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

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

#### 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-google-tag-to-your-landing-page-in-sprinthub.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.
