You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
777 B

2 years ago
  1. <% if (theme.google_analytics) { %>
  2. <script>
  3. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  4. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  5. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  6. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  7. /* Prepare GA Session, disable cookies to protect privacy */
  8. ga("create", "<%= theme.google_analytics %>", {storage: "none",});
  9. /* Privacy settings - not tracking anything personal */
  10. ga("set", "allowAdFeatures", false);
  11. ga("set", "anonymizeIp", true);
  12. ga("set", "forceSSL", true);
  13. /* Send simple anonymized pageview */
  14. ga("send", "pageview");
  15. </script>
  16. <% } %>