HubSpot Tracking Code tag

Tag Manager

A HubSpot Tracking Code tag lets you collect data on your website and send it to HubSpot. From there, you can analyze your contacts and customers.

In this article, we’ll show you how to set it up.

Before you start

Here are some things to know before you start:

  • If HubSpot displays a cookie banner on your site and you want to use our Consent Manager, you can turn off the banner in HubSpot > Settings > Privacy & Consent. Then, set a consent type in tag settings in Piwik PRO > Tag Manager > Tags > HubSpot Tracking Code tag. The HubSpot code will only fire when visitors agree to the selected consent type.

Set up your tag

To set up the HubSpot Tracking Code tag, follow these steps:

  1. Log in to HubSpot.
  2. Click your account name in the upper right corner.
  3. Copy your HubSpot ID. You’ll see it under your account name.
    HubSpot Tracking Code tag
  4. Log in to Piwik PRO.
  5. Go to Menu > Tag Manager.
  6. Navigate to Tags.
  7. Click Add a tag.
  8. Name your tag and select the following type: HubSpot Tracking Code.
  9. Click Next.
  10. Paste your HubSpot ID.
    HubSpot Tracking Code tag in Tag Manager in Piwik PRO
  11. In Advanced tag settings, choose Consent type. Set it up if you use a consent form on your site. This tag will only fire for visitors who accept the selected consent type.
  12. Respect opt-out and DNT is turned on by default. Leave it as is if you want to respect visitors who’ve turned on the Do-Not-Track feature in their browsers or who’ve opted out of tracking using our opt-out form.
  13. In Flight dates, set the date and time when the tag will fire.
  14. In Tag triggers, click Add a trigger or Choose existing trigger to set up a trigger for your tag.
  15. Click Save.
  16. Test your tag in debug mode.
  17. When you’re happy with how the tag works, click Publish.
  18. Done!

Was this article helpful?

Technical support

If you still have any questions, visit our community.
There’s always someone happy to help!

Related articles

Back to help center