Confused between Google's Universal Analytics and Async Analytics. Are we supposed to use both? -
after setting google analytics first time went admin > tracking code: apparently universal analytics given me.
<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','//www.google-analytics.com/analytics.js','ga'); ga('send', 'pageview'); </script>
i can't find asynchronous tracking code (which this):
<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setaccount', 'ua-xxxxx-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>
- am supposed use one?
- do both go right before
</head>
?
as universal in beta, continue using ga.js tracker on primary web properties. if want try out new functions (e.g. custom dimensions/metrics) of universal, can create new property it.
also, simplify deployment, try google tag manager.
Comments
Post a Comment