Google Analytics Code not working

Support desk for Multipurpose Quark Theme
GK User
Wed Feb 01, 2017 7:46 pm
Hi, I have reached the problem with the GA code.
I saw in other topics you have suggested to paste the code into head.php - where exactly should I place the code? And is this syntax OK: UA-87612234-1?
In the template Features I initially chose Universal Analytics from the dropdown, now I just changed it to Google Analytics.
Please let me know what you think. I will also send a PM with the website url and credentials, so you can take a look at it, if you have time.
Thank you so much in advance, best regards
User avatar
Junior Boarder

teitbite
Sun Feb 05, 2017 12:58 pm
Hi

The code You pasted is not ok. It's just the ID which was attached to You. What I had in mind to copy whole script which can be generated on GA, but an example can be seen here: https://developers.google.com/analytics ... alyticsjs/
User avatar
Moderator

GK User
Sun Feb 05, 2017 4:50 pm
Hi, teitbite.
Thank you for your reply.
I tried to paste the JS code in the article indicated (with the UA code I have for my website), but then my website disappears, leaving me with an error... I pasted the code into templates/gk_quark/layouts/blocks/head.php
Am I doing something wrong? Because it doesn't seem to work.
Awaiting for your reply, best regards
User avatar
Junior Boarder

teitbite
Wed Feb 08, 2017 2:28 pm
Hi

Please send me an url and joomla panel access. I need to see how it looks like now.
User avatar
Moderator

GK User
Wed Feb 08, 2017 4:58 pm
Just sent a PM, teitbite - awaiting for your feedback, thank you!
User avatar
Junior Boarder

GK User
Thu Feb 09, 2017 3:05 pm
I have the same problem..

I put my Google Analytics code into the spot in the template where it says to input the code.. but it doesn't work.
User avatar
Fresh Boarder

teitbite
Tue Feb 14, 2017 6:20 pm
Hi

Here is a code I've added to /layouts/blocks/head.php

Code: Select all
<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-XXXXXXXX-X', 'auto');
ga('send', 'pageview');
</script>


Think it's working now, but please check.
User avatar
Moderator

GK User
Sat Feb 18, 2017 5:16 pm
Hi, teitbite - it does, I can see activity starting from the 14th of February :)
Perfect! Great job, as always :ugeek:
User avatar
Junior Boarder

teitbite
Thu Feb 23, 2017 11:33 am
Hi
Glad I could help.
---
If You were satisfied with our support please let other users know on Twitter: http://twitter.com/gavickpro or Facebook: http://www.facebook.com/gavickpro
User avatar
Moderator


cron