HubSpot Tracking Code tag

Tag Manager

The HubSpot Tracking Code tag lets you track leads from your website. With Tag Manager, you can set it up in a hassle-free way.

Before you start

Here are some things to know before you add this tag to your site:

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

Set up the tag

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

  1. Log in to HubSpot.
  2. Go to HubSpot > The name of your account.
  3. Copy the HubSpot ID. You’ll see it under the name of your account.
    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 the tag and select the following type: HubSpot Tracking Code.
  9. Click Next.
  10. Paste the 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 fire only 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 set Do-Not-Track in their browsers, or visitors who opt out of tracking using our opt-out form.
  13. In Flight dates, set the date and time when the tag is fired.
  14. In Tag triggers, click Add a trigger or Choose existing trigger to set up a trigger for your tag.
  15. Adjust trigger conditions.
  16. When you’re done, click OK for the trigger.
  17. Click Save for the tag.
  18. Test your tag in debug mode.
  19. When you’re happy with how the tag works, click Publish.

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