Reporting & Analytics

Alex_
Top Contributor

Running the HubSpot code through Google Tag Manager

SOLVE

Hello,

 

I have an interesting question for something I've never come across and I was wondering how y'all see tracking code best practices.

 

I've only ever used the best practice of implementing a tracking code in the footer or header of a website and have never heard of adding it to GTM.

 

Would y'all consider both to be a best practice, or maybe one over the other?

 

If y'all did consider the latter a best practice - why? Pro's? Con's?

0 Upvotes
1 Accepted solution
Josh
Solution
Recognized Expert | Platinum Partner
Recognized Expert | Platinum Partner

Running the HubSpot code through Google Tag Manager

SOLVE

Hi @Alex_ ,

 

Here's a post in the knowledge base of how to do it.

 

We have done this on client's websites that are not on the HubSpot CMS and use GTM for other purposes. We have not experienced and issues with it. The pros are the same as with GTM in general:

  • Easily adding, removing, adjusting tags without needing a developer
  • Choosing which tags fire on which pages
  • Choosing which tags fire on which conditions

Josh




Did this post help solve your problem? If so, please mark it as a solution.

Josh Curcio

HubSpot support and inbound marketing for OEMs, contract manufacturers, and industrial suppliers.
HubSpot Platinum Partner & HubSpot Certified Trainer

View solution in original post

4 Replies 4
Josh
Recognized Expert | Platinum Partner
Recognized Expert | Platinum Partner

Running the HubSpot code through Google Tag Manager

SOLVE

There are so many variables...

 

If it were a WordPress site and you are using the plugin, it's unnecessary. 

 

For our company, it would be a best practice if other tags were using GTM. We probably wouldn't deploy GTM for this sole purpose unless there was another underlying reason. 




Did this post help solve your problem? If so, please mark it as a solution.

Josh Curcio

HubSpot support and inbound marketing for OEMs, contract manufacturers, and industrial suppliers.
HubSpot Platinum Partner & HubSpot Certified Trainer

Josh
Solution
Recognized Expert | Platinum Partner
Recognized Expert | Platinum Partner

Running the HubSpot code through Google Tag Manager

SOLVE

Hi @Alex_ ,

 

Here's a post in the knowledge base of how to do it.

 

We have done this on client's websites that are not on the HubSpot CMS and use GTM for other purposes. We have not experienced and issues with it. The pros are the same as with GTM in general:

  • Easily adding, removing, adjusting tags without needing a developer
  • Choosing which tags fire on which pages
  • Choosing which tags fire on which conditions

Josh




Did this post help solve your problem? If so, please mark it as a solution.

Josh Curcio

HubSpot support and inbound marketing for OEMs, contract manufacturers, and industrial suppliers.
HubSpot Platinum Partner & HubSpot Certified Trainer

marycheung
Member

Running the HubSpot code through Google Tag Manager

SOLVE

Hi Josh,

 

My website is using sitecore CMS and I've installed the hubspot tracking code via GTM. Unfortunately it's blocked - 

  • In the Name column, look for [your Hub ID].js (e.g., 401264.js). Under the name, you may see from js.hs-scripts.com and/or an instance of this .js element from js.hs-analytics.com.
  • Next to [your Hub ID].js, you should see 304 Not Modified or 200 OK in the Status column.

Do you know any ways that I can install the hubspot code properly? thanks a lot!

hubspot blocked.JPG

0 Upvotes
Alex_
Top Contributor

Running the HubSpot code through Google Tag Manager

SOLVE

Thanks for replying, @Josh. Would you consider this a best practice; running the tracking code through GTM?

0 Upvotes