First, copy the HubSpot tracking code
- Navigate In HubSpot Marketing to Reports > Reports Settings.
- At the top of the screen, you will see your HubSpot Tracking Code. Click Copy to clipboard.
Add the tracking code as a tag within Google Tag Manager
- In a new browser tab or window, log into your Google Tag Manager account and select your container.
- Click on Tag Configuration
- For the Tag Type choose 'Custom HTML Tag'.
- Add a descriptive Tag Name at the top.
- In the HTML section, paste in the HubSpot tracking code copied from your Reports Settings.
- Below Tag Configuration, click on Triggering to set up a firing rule. (Note: if you do not setup a firing rule then the tag will not fire and HubSpot analytics data will not be collected).
- For the tag to fire on all pages with the Google Tag Manager code installed (recommended) select the option for All Pages.
- Save the new tag that was just created.
- Click on the 'Publish' button in the top right corner to save your container and tags.
- Add the Google Tag Manager code to your website pages below the <body> tag, if not already installed. The Google Tag Manager code is available under Admin > Install Google Tag Manager.