Hello there,
I have just started using Google Analytics (GA) on our Kentico site and everything works well... except the event tracking. I've pretty much done all that there is to do but GA still isn't tracking the events. This is what I've placed in CMS Desk:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-********-*']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
I think I also posted this on my master page and my two-column template.
and the links look like this:
<a href="/Documents/Practice-Support-Documents/Scope-of-Practice-ONLINE.aspx" onClick="_gaq.push(['_trackEvent', 'PolicyPractice', 'Click', 'Scope of Practice Document']);"> Scope of Practice for Licensed Practical Nurses</a>
I'm quite new to coding, so please bear with me.
Thank you