Last updated: February 15, 2024
You can integrate Google Tag Manager with HubSpot to track your HubSpot-hosted landing pages, website pages, blog, and knowledge base in Google Tag Manager. Learn more about Google Tag Manager in Google's getting started guide, which includes a page on common questions.
When you integrate HubSpot with Google Tag Manager, the tag manager will run on all HubSpot-hosted content. External content will need to be connected separately to Google Tag Manager.
Please note: your Google Tag Manager ID will be formatted as GTM-XXXXXX. You will need to remove the GTM at the start of the ID before entering it into HubSpot.
You can also add the Google Tag Manager code to HubSpot-hosted content manually. This is recommended if you only want some HubSpot-hosted domains tracked this way. These steps only apply for accounts that have access to site header and footer HTML settings.
Please note: if you add code to the header or footer HTML for a specific domain, it will override any code you have placed in header and footer HTML in Default settings for all domains. Learn more about the order that code is applied to your pages.