mirror of
https://github.com/nairobilug/pelican-alchemy.git
synced 2024-12-30 12:15:06 +01:00
Merge 26937d659f into fd70e764b4
This commit is contained in:
commit
777a72e9dc
1 changed files with 6 additions and 13 deletions
|
|
@ -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 %}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue