Skip to content
English - United States
  • There are no suggestions because the search field is empty.

Add Google Tag Manager Script

Connect Google Tag Manager to track visitor behavior on your website.

Quick Jump To Guide
What is Google Tag Manager
Add Google Tag Manager


What is Google Tag Manager?

Google Tag Manager (GTM) lets you add and manage tracking and marketing tags on your website without editing any code. Read more about Google Tag Manager here: Introduction to Tag Manager.

For questions about Google Tag Manager's functionality, contact Google directly.

Add Google Tag Manager

Navigate to Website >> Settings >> General. Paste the first GTM script in the Header Includes field and the second in the Global Scripts field.

1. Header Includes

The first GTM script goes in the Header Includes field. 

Screenshot 2026-08-25 at 5.17.54 PM

Here's an example of what the first script looks like, where "GTM-XXXXXX" represents your unique GTM ID.

<!-- 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-XXXXXX');</script>
<!-- End Google Tag Manager -->

2. Global Scripts

The second GTM script goes in the Global Scripts field. 

Screenshot 2026-08-25 at 5.19.26 PM

Here's an example of what the second script looks like, where "GTM-XXXXXX" represents your unique GTM ID.

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

Note: Use the Header Includes and Global Scripts fields for your GTM script. The separate Google Analytics field is for your Google Analytics ID. Read more here: Connect Google Analytics.