Posted - 12/29/2017 : 07:24:13
Let me see if I have this straight. Please let me know if I'm misunderstanding.
To set up analytics I add this code just above the closing body tag on all my ecommerce pages:
<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('create', 'UA-xxxxxxxx-x', 'auto'); ga('send', 'pageview'); ga('require','ecommerce','ecommerce.js'); <?php print @$googleanalyticstrackorderinfo ?> </script>
and in includes.php I add:
$googleanalyticsinfo=TRUE; $usegoogleasync=TRUE; $usegoogleuniversal=TRUE;
Edited by - John Nolan on 12/29/2017 07:24:59
|