I couldn't find an answer to this so thought i'd ask...
Google analytics have updated their tracking code recently (v10 still using old code)
Question is will this new code from google work
NEW:
OLD:
Is it as simple as copy an paste or does it need some blockifs in for receipt pages etc?
Google analytics have updated their tracking code recently (v10 still using old code)
Question is will this new code from google work
NEW:
Code:
<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXXXX-XX']); _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>
OLD:
Code:
<actinic:block if="%3cactinic%3avariable%20name%3d%22IsGoogleAnalyticsEnabled%22%20%2f%3e%20%3d%3d%20true" > <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> if (typeof(_gat) == 'object') { var pageTracker = _gat._getTracker("<actinic:variable name="GoogleAnalyticsNumber" />"); pageTracker._initData(); pageTracker._trackPageview(<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Receipt%22">"/receipt.html"</actinic:block>); } </script> </actinic:block>
Is it as simple as copy an paste or does it need some blockifs in for receipt pages etc?
Comment