How to Add a Tracking Pixel in HubSpot

A step-by-step guide to adding a tracking pixel in HubSpot's Ads settings, with the current UI walkthrough, permissions and consent considerations for B2B teams.

John Kelleher
John Kelleher

Adding a tracking pixel to HubSpot lets you measure ad performance, optimise spend and build retargeting audiences from people who visit your site or fill in your forms. The job itself takes a couple of minutes once your ad account is connected. The harder part is getting it set up cleanly so the data is accurate, consent is handled properly and the pixel actually fires where you expect it to.

This guide walks through the current HubSpot Ads settings step by step, then covers the configuration details that trip up most mid-market teams.

What a tracking pixel does in HubSpot

A tracking pixel is a small snippet of code from an ad network, such as Facebook (Meta), Google or LinkedIn, that records when someone visits a page. HubSpot can inject that pixel into your HubSpot-hosted pages and forms automatically, so you do not have to paste code into every template by hand.

Once installed, the pixel feeds three things back to the ad network: signal for optimising your campaigns, conversion measurement, and the visitor data needed to build website-based ad audiences for retargeting. For a B2B team running paid acquisition alongside the CRM, this is what closes the loop between ad spend and pipeline.

Before you start: prerequisites

Two things need to be in place before the pixel option will work.

  • The ad account must be connected to HubSpot first. You connect Facebook Ads, Google Ads or LinkedIn Ads under Settings > Marketing > Ads, on the Accounts tab. The pixel for a network only appears once that network's account is linked.
  • You need Ads Publish permissions. If the option is greyed out, your user does not have the right permission set. A HubSpot super admin can grant this under Settings > Users & Teams.

How to add a tracking pixel in HubSpot, step by step

  1. In your HubSpot account, click the Settings cog icon in the top navigation bar.
  2. In the left sidebar menu, navigate to Marketing > Ads.
  3. Click the Pixels tab at the top of the Ads settings.
  4. Click Add pixel in the top right.
  5. Select the ad network you want: Facebook (Meta), Google Ads or LinkedIn.
  6. Open the Pixel dropdown and choose the specific pixel from the connected account.
  7. Click Add pixel to confirm.

HubSpot will then add that pixel to all of your HubSpot-hosted pages, and to any external pages where your HubSpot tracking code is installed. There is no need to drop the code into individual page templates.

Configure it properly: the bits people miss

Decide where the pixel should fire

In the Ads settings you can control whether HubSpot automatically adds tracking pixels to your HubSpot content. Leaving auto-injection on is the simplest route for most teams. If you manage pixels through a separate tag manager, or you only want the pixel on certain properties, turn auto-injection off and place the code deliberately so you do not end up firing the same pixel twice and double-counting conversions.

Handle consent before you turn it on

Tracking pixels set cookies, which puts them squarely inside UK GDPR and PECR. If you are targeting UK or EU audiences, the pixel should not fire until the visitor has given consent through your cookie banner. HubSpot is clear that following the relevant laws and each network's policies is your responsibility, and that compliance advice should come from your own legal team. In practice that means wiring the pixel to your consent management so it loads only after opt-in.

Verify the pixel is actually firing

Do not assume it works because HubSpot says it is installed. Use the network's own debugger, such as the Meta Pixel Helper or Google Tag Assistant browser extensions, to load a page and confirm the pixel fires and reports the right events. This is also where you catch duplicate pixels from an old manual install still sitting in a template.

Where pixel setup fits in a clean HubSpot build

A pixel is a small task, but it sits on top of a bigger question: is your HubSpot portal configured so the data you collect is trustworthy? Misfiring pixels, duplicate tracking codes and audiences built on messy contact data are usually symptoms of a portal that was set up in a hurry and never properly architected.

If you are connecting ad platforms, web analytics and your CRM into one reporting picture, it pays to get the underlying setup right. Our HubSpot CRM implementation work covers exactly this: clean tracking, sensible properties, and reporting you can act on. If the issue is the ad accounts and other tools talking to HubSpot at all, our HubSpot integrations hub and the guide to connecting anything with HubSpot integrations are the place to start. And if you want the data to drive ongoing campaign decisions rather than sit in a dashboard, that is the remit of managed RevOps.

Quick troubleshooting

  • No pixel appears in the dropdown: the ad account is not connected yet, or you are looking at the wrong network. Connect it on the Accounts tab first.
  • The Add pixel option is greyed out: you are missing Ads Publish permissions. Ask a super admin.
  • Conversions are double-counting: the same pixel is installed twice, usually once by HubSpot and once manually in a template or tag manager. Remove the duplicate.
  • The pixel never fires: check that your HubSpot tracking code is installed on external pages, and that your consent banner is not blocking it for everyone.

Adding the pixel is the easy part. Making sure it reports clean, consented, deduplicated data into a CRM you can trust is the work that actually pays off.

Get your HubSpot set up properly with CRM implementation

John Kelleher

John Kelleher

Author
John is the founder and the Chief Executive at SpotDev.