Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Steve Silver Posted November 6, 2019 Posted November 6, 2019 Tried adding a Google Analytics tracking I.D into the 'Analytics' CP, code looks something like, e'g; UA-95867698466 but once I add this - it then appears as text literally at the top of the index page header! Anyone know if this is an error? or there's a different way to add the Analytics code?
Jim M Posted November 6, 2019 Posted November 6, 2019 You'll want to use the whole tracking script that Google provides. The "UA-..." ID is just your account ID. The tracking script is Javascript so will start with a "<script..." and end with "</script>" (of course without quotes).
Daniel F Posted November 6, 2019 Posted November 6, 2019 4 minutes ago, Steve Silver said: Tried adding a Google Analytics tracking I.D into the 'Analytics' CP, code looks something like, e'g; UA-95867698466 but once I add this - it then appears as text literally at the top of the index page header! Anyone know if this is an error? or there's a different way to add the Analytics code? You'll need to use the full analytics js code
Adlago Posted November 6, 2019 Posted November 6, 2019 7 minutes ago, Steve Silver said: Tried adding a Google Analytics tracking I.D into the 'Analytics' CP, code looks something like, e'g; UA-95867698466 but once I add this - it then appears as text literally at the top of the index page header! Anyone know if this is an error? or there's a different way to add the Analytics code? Add this script <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-95867698466', 'auto'); ga('send', 'pageview'); </script>
Steve Silver Posted November 6, 2019 Author Posted November 6, 2019 Fantastic - added correct script + own ID, now all working, Many Thanks - much appreciated, great community here.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.