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
- Visit your website and Right Click + View Page Source
- 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
- In your HubSpot Portal go to Settings > Website > Pages. Then click on the Integrations tab. You may have GTM integrated here:
- 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
- Go to https://tagmanager.google.com/ to check for any existing accounts you have access to. You may also need to check marketing@company.com accounts.
- 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
- If you don't have GTM embedded on your website, and you can't find an existing account, you can create a new one.
- Go to https://tagmanager.google.com/#/home and click Create Account.
- Set the account name and location
- Give the container a name (your website URL) and choose the target platform (Web for websites)
- Click Create
- Agree to the Google Tag Manager Terms of Service Agreement
- On the creation of your new GTM Account and Container, you will see a popup like this with the GTM tracking code.
- 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
- In your HubSpot Portal go to Settings > Website > Pages. Then click on the Integrations tab. This is where you will place your GTM ID.
- 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:
- Copy your GTM Container ID
- Paste it into the GTM field:
- Save your changes.
Google Tag Manager is now embedded on your HubSpot pages.