Google Analytics and Apex
reidsterOct 27 2010 — edited Dec 19 2011Does anyone have experience with using Google Analytics with APEX? I have put the GA code snippet into the APEX Page Javascript "Execute when page loads" and also tried putting it in the "Function and Global Variable Declaration" section. Neither one seems to work. I get no GA data. I know this is something that should be simple, but I'm just missing something. I'm only trying to track data on a logon page; since all other pages are authenticated, I didn't think that GA could track statistics about them.
<script type="text/javascript">
var gaq = gaq || [];
gaq.push(['setAccount', 'UA-XXXXXX-X']);
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>
Any ideas?
Thanks,
Reid
Apex 4.0.1