Viewing 4 reply threads
You must be logged in to reply to this topic.
Hi,
I’m having trouble to get Google Analytics working. I added the code in here: Specular/General Options/Tracking Code. Could you please check if I the added code is right:
/*jQuery(document).ready(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','//www.google-analytics.com/analytics.js','ga');
ga('create', 'TRACKINGCODE', 'auto');
ga('send', 'pageview');
*/
Thanks!
Hello,
Please remove the comment symbols at the beginning and the end. The /*
and */
and try again. Let us know.
Best regards!
Well I have a similar issue. I get ‘jQuery ‘ is undefined error when I place this code in the Specular->General options-> ‘Tracking code’ section. Please HELP!
jQuery(document).ready(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’,’//www.google-analytics.com/analytics.js’,’ga’);
ga(‘create’, ‘UA-44803687-6’, ‘auto’);
ga(‘send’, ‘pageview’);
Hello,
Please make sure you have pasted it right. I tested your code and didn’t get any error. If you can send us your wp credentials in aprivate reply, so we can give it a look.
Best regards!
You have to put the code without the jQuery(document).ready, because the jquery is declared after de google analytics code.
I hope I help yoy!
Best regards!
You must be logged in to reply to this topic.