templates/optipac/analytics_google_ch.html5 line 17

Open in your IDE?
  1. <?php
  2. /**
  3.  * To use this script, please fill in your Google Analytics ID below
  4.  */
  5. $GoogleAnalyticsId 'UA-19463087-1';
  6. /**
  7.  * DO NOT EDIT ANYTHING BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING!
  8.  */
  9. if ($GoogleAnalyticsId != 'UA-XXXXX-X' && !BE_USER_LOGGED_IN && !$this->hasAuthenticatedBackendUser()): ?>
  10. <script>
  11.   (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','https://www.google-analytics.com/analytics.js','ga');
  12.   ga('create', '<?= $GoogleAnalyticsId ?>', 'auto');
  13.   <?php if (Config::get('privacyAnonymizeGA')): ?>
  14.     ga('set', 'anonymizeIp', true);
  15.   <?php endif; ?>
  16.   ga('send', 'pageview');
  17. </script>
  18. <?php endif; ?>