Set up Google Tag Manager (GTM) and Embed on your Website

We recommend GTM is set up and embedded on your website to allow easy addition and organisation of tracking scripts.

Check if GTM is already embedded on your website

Option 1: Check the Page Source

  1. Visit your website and Right Click + View Page Source
  2. Ctrl+F or Command+F to find 'Google Tag Manager' or 'GTM'

    If you don't see Google Tag Manager code, or a GTM ID i.e. GTM-XXXXXX then you do not have GTM embedded on your website. Follow the steps below to set up GTM and embed it on your HubSpot website.

Option 2: Check in HubSpot Settings

  1. In your HubSpot Portal go to Settings > Website > Pages. Then click on the Integrations tab. You may have GTM integrated here:
  2. Check the settings for all domains, not just the default. You may have GTM integrated for some domains but not all.

    If you don't see GTM integrated here, you have not integrated GTM via HubSpot.

Check for an existing GTM account

  1. Go to to check for any existing accounts you have access to. You may also need to check accounts.
  2. If you found GTM embedded on your website in the previous step, make sure the Container ID matches (so you know you are looking at the right account).

Set up a new GTM account

  1. If you don't have GTM embedded on your website, and you can't find an existing account, you can create a new one.
  2. Go to and click Create Account.
  3. Set the account name and location
  4. Give the container a name (your website URL) and choose the target platform (Web for websites)
  5. Click Create
  6. Agree to the Google Tag Manager Terms of Service Agreement
  7. On the creation of your new GTM Account and Container, you will see a popup like this with the GTM tracking code. 
  8. You can retrieve this code at any time by clicking on your Container ID:

Let's move on to adding GTM to your HubSpot website.

Integrate GTM in your HubSpot Portal

  1. In your HubSpot Portal go to Settings > Website > Pages. Then click on the Integrations tab. This is where you will place your GTM ID.
  2. Decide if you want the GTM ID to be on all domains in HubSpot, or only some. You can select the domain you want to edit here:
  3. Copy your GTM Container ID
  4. Paste it into the GTM field:
  5. Save your changes.

Google Tag Manager is now embedded on your HubSpot pages.