TODO: revert google_analytics move

This commit is contained in:
Victor Feyens 2021-01-29 18:27:22 +01:00
parent 496f7ade5c
commit 5ca80c00c9
2 changed files with 2 additions and 0 deletions

View File

@ -51,6 +51,7 @@
#}
{% block footer %}
{%- if google_analytics_key -%}
{# FIXME VFE bring back old logic, it cannot be specified in a js file. #}
<script type="text/javascript"
src="{{ pathto('_static/js/google_analytics.js', 1) }}"></script>
{%- endif -%}

View File

@ -3,6 +3,7 @@
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
// VFE FIXME, the {{}} is jinja code, it cannot be moved in an independent js code :P
ga('create', '{{ google_analytics_key }}', 'auto');
ga('set', 'anonymizeIp', true);
ga('send','pageview');