This commit is contained in:
Johan Guldmyr 2023-04-20 11:54:10 +03:00 committed by GitHub
commit 777a72e9dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,18 +1,11 @@
{% if GOOGLE_ANALYTICS %} {% if GOOGLE_ANALYTICS %}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ GOOGLE_ANALYTICS }}"></script>
<script> <script>
(function(i, s, o, g, r, a, m) { window.dataLayer = window.dataLayer || [];
i['GoogleAnalyticsObject'] = r; function gtag(){dataLayer.push(arguments);}
i[r] = i[r] || function() { gtag('js', new Date());
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); gtag('config', '{{ GOOGLE_ANALYTICS }}');
a = s.createElement(o);
a.async = 1;
a.src = g;
m = s.getElementsByTagName(o)[0];
m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
ga('create', '{{ GOOGLE_ANALYTICS }}', 'auto');
ga('send', 'pageview');
</script> </script>
{% endif %} {% endif %}