Sha256: 33f989c480c4c8ee427c20bd6c59b4bfc0b59eb2a7ae2cf131cc5407d243572d
Contents?: true
Size: 1.47 KB
Versions: 12
Compression:
Stored size: 1.47 KB
Contents
{% if site.google_analytics %} <script>!function(w, d) { w.ga=w.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; /*{% if site.hydejack.cookies_banner %}*/ if (navigator.CookiesOK) { ga('create', '{{ site.google_analytics }}', 'auto'); } else if (d.cookie.indexOf("hy--cookies-ok=true") > -1) { ga('create', '{{ site.google_analytics }}', { 'storage': 'none', 'clientId': localStorage ? localStorage.getItem('ga--client-id') : undefined }); } else { ga('create', '{{ site.google_analytics }}', { 'storage': 'none' }); ga('set', 'forceSSL', true); ga('set', 'anonymizeIp', true); } /*{% else %}*/ ga('create', '{{ site.google_analytics }}', 'auto'); /*{% endif %}*/ var pushStateEl = d.getElementsByTagName('hy-push-state')[0]; var timeoutId; pushStateEl.addEventListener('hy-push-state-load', function() { w.clearTimeout(timeoutId); timeoutId = w.setTimeout(function() { ga('set', 'page', w.location.pathname); ga('send', 'pageview'); }, 500); }); d.addEventListener('hy--cookies-ok', function () { w.ga(function(tracker) { w.ga("set", "anonymizeIp", undefined); localStorage && localStorage.setItem("ga--client-id", tracker.get("clientId")); }); }); w.loadJSDeferred('https://www.google-analytics.com/analytics.js'); }(window, document);</script> {% endif %}
Version data entries
12 entries across 12 versions & 2 rubygems