Reporting & Analytics

JLeimer
Member

Website tracking not working for Joomla/Gantry 5

SOLVE

It was a bit tricky but it appears that I successfully setup the tracking code into Gantry 5 on my joomla website.  when I look at the source code of the site. the tracking code is there & in the correct place.  However,  My hubspot account says "HubSpot has not yet been installed on your website."

0 Upvotes
1 Accepted solution
Ben_M
Solution
Key Advisor

Website tracking not working for Joomla/Gantry 5

SOLVE

Your Hubspot code is definitely being messed with in your setup and your template system has re-written what should be there.  Have you considered trying to use a Tag Management Platform like Google Tag Manager with your site? This would allow for a more streamlined and controlled setup and prevent you from having to load and target scripts on each individual pages.

 

In short,  what is happening is that your script code is being rewritten.  Instead of:

<!-- Start of HubSpot Embed Code -->
<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/000000.js"></script>
<!-- End of HubSpot Embed Code -->

 

You are ending up with:

 

<script type="text/javascript">id="hs-script-loader" async defer src="//js.hs-scripts.com/000000.js"</script>

So you see what should be inside of the script tag is being pushed outside of it by your editor, thus making the script not function because it is invalid.  I've removed your account number from the script and replaced with 0's to show what is happening.

View solution in original post

0 Upvotes
2 Replies 2
Ben_M
Solution
Key Advisor

Website tracking not working for Joomla/Gantry 5

SOLVE

Your Hubspot code is definitely being messed with in your setup and your template system has re-written what should be there.  Have you considered trying to use a Tag Management Platform like Google Tag Manager with your site? This would allow for a more streamlined and controlled setup and prevent you from having to load and target scripts on each individual pages.

 

In short,  what is happening is that your script code is being rewritten.  Instead of:

<!-- Start of HubSpot Embed Code -->
<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/000000.js"></script>
<!-- End of HubSpot Embed Code -->

 

You are ending up with:

 

<script type="text/javascript">id="hs-script-loader" async defer src="//js.hs-scripts.com/000000.js"</script>

So you see what should be inside of the script tag is being pushed outside of it by your editor, thus making the script not function because it is invalid.  I've removed your account number from the script and replaced with 0's to show what is happening.

0 Upvotes
JLeimer
Member

Website tracking not working for Joomla/Gantry 5

SOLVE

Thanks Ben for your quick & thorough reply.  It ended up being an extra web security option by my site host (dreamhose) & it is not working using the Hubspot script.  However,  I'm going to take your advice and setup Google Tage Manager.

0 Upvotes