How to Add the Google Tag Manager code to HubSpot content

Google Tag Manager can be integrated with HubSpot to track your HubSpot-hosted landing pages, website pages, blog, and knowledge base. Learn more about the HubSpot tracking code.

HubSpot Google Tag Manager Integration

When you integrate HubSpot and Google Tag Manager, the tag manager is applied to all HubSpot-hosted content. External content must be linked to Google Tag Manager separately.

  • Click the settings icon in the main navigation bar of your HubSpot account.
  • Navigate to Website > Pages in the left sidebar menu.
  • Navigate to the Integrations tab.
  • Check the Integrate with Google Tag Manager option.

In the text field, enter your Google Tag Manager ID. Discover how to locate this in your Google Tag Manager account from here. Your HubSpot google tag manager is almost ready!

hubspot gtm

  • Hit the Save button to apply changes.

Manually Enter The Google Tag Manager Code

You can also manually add the Google Tag Manager code to HubSpot-hosted content. This is recommended if you only want to track some HubSpot-hosted domains in this manner. These steps only apply to accounts with access to the site header and footer HTML settings.

  • Enter your Google Tag Manager credentials.
  • Navigate to the Admin tab.
  • Select the Container that contains your tags from the Container dropdown.
  • Install Google Tag Manager by clicking the Install button.

tag manager

  • On the following screen, you can copy both code snippets (1) and (2) for your Google Tag Manager Container.

cop code

Insert the Google Tag Manager Code Into Your HubSpot Content

  • Click the settings icon in the main navigation bar of your HubSpot account.
  • Navigate to Website > Pages in the left sidebar menu.
  • Select a domain from the Choose a domain to edit its settings dropdown menu. Select Default settings for all domains if you want to add the code to all of your HubSpot-hosted domains.

GOOGLE TAG MANAGER

  • Copy and paste the following code snippets from Google Tag Manager:
  1. In the Site header HTML field, paste the Javascript code snippet.
  2. In the Site footer HTML section, paste the noscript> code snippet.

GTM Code

  • To apply all changes, click save.

Was this Helpful ?

CONTACT

Ready to transform how you market your business

Let's get connected for a free consultation