Ads

akismail
Member

Ad Tracking in header HTML vs. in ad settings

SOLVE

Is there any difference between adding an ad tracking snippet to your HubSpot site header HTML file vs. adding it via Settings>Ads>Pixels?

 

I have a client that hard coded their tracking snippets into their header HTML file (they're using HubSpot for their website). Wondering if it's worth moving it to the Settings>Ads>Pixels section.

 

(Using Google tag manager, Facebook, LinkedIn).

2 Accepted solutions
ajchapman20
Solution
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Ad Tracking in header HTML vs. in ad settings

SOLVE

Hi @akismail ,

 

It sounds like you would like to understand if there are any differences if you use HubSpot to add a tracking pixel to a site or if it's coded into the HTML for the site.

 

The only real difference would be with Google Analytics. You should use the HTML option if they have customized the script at all. Also, when you add your Google Analytics tracking code to the header HTML instead of integrating Google Analytics with HubSpot, the Google Analytics script cannot be controlled by the HubSpot cookie policy banner and by default, will record data on visitors regardless of whether a visitor opts in or out, unless you customize your Google Analytics script.

 

Typically, if you're using the HubSpot ads tool to add a pixel to pages with the HubSpot tracking code, your privacy policy banner will automatically display when the pixel fires on your pages. If you require visitors to opt into cookie tracking, the pixel will not be able to place any cookies until the visitor confirms their consent.

 

More on this can be found here.

 

Feel free to reach out if you have additional questions!

 

Thanks,

Alex Chapman | Inbound marketing Expert

View solution in original post

NSScott
Solution
Contributor

Ad Tracking in header HTML vs. in ad settings

SOLVE

If your client has a hardcoded site, it's probably best to add ONE tracking code in the form of a GTM tag. 

 

That way anytime there a new tracking to add/ remove, all you have to do is make this change in Google Tag Manager. So no need to get the client/ dev team to edit header tags every time there's a change. 

 

See Aakar's reply on this forum post: https://community.hubspot.com/t5/Ads/Header-or-integration-for-Google-Ads-Analytics-Hotjar-tracking/...

View solution in original post

2 Replies 2
NSScott
Solution
Contributor

Ad Tracking in header HTML vs. in ad settings

SOLVE

If your client has a hardcoded site, it's probably best to add ONE tracking code in the form of a GTM tag. 

 

That way anytime there a new tracking to add/ remove, all you have to do is make this change in Google Tag Manager. So no need to get the client/ dev team to edit header tags every time there's a change. 

 

See Aakar's reply on this forum post: https://community.hubspot.com/t5/Ads/Header-or-integration-for-Google-Ads-Analytics-Hotjar-tracking/...

ajchapman20
Solution
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Ad Tracking in header HTML vs. in ad settings

SOLVE

Hi @akismail ,

 

It sounds like you would like to understand if there are any differences if you use HubSpot to add a tracking pixel to a site or if it's coded into the HTML for the site.

 

The only real difference would be with Google Analytics. You should use the HTML option if they have customized the script at all. Also, when you add your Google Analytics tracking code to the header HTML instead of integrating Google Analytics with HubSpot, the Google Analytics script cannot be controlled by the HubSpot cookie policy banner and by default, will record data on visitors regardless of whether a visitor opts in or out, unless you customize your Google Analytics script.

 

Typically, if you're using the HubSpot ads tool to add a pixel to pages with the HubSpot tracking code, your privacy policy banner will automatically display when the pixel fires on your pages. If you require visitors to opt into cookie tracking, the pixel will not be able to place any cookies until the visitor confirms their consent.

 

More on this can be found here.

 

Feel free to reach out if you have additional questions!

 

Thanks,

Alex Chapman | Inbound marketing Expert