|
@@ -216,10 +216,14 @@
|
|
|
|
|
|
{%- if not app.debug and google_analytics.ga_key %}
|
|
|
<script>
|
|
|
- var _gaq=[['_setAccount','{{ google_analytics.ga_key }}'],['_trackPageview']];
|
|
|
- (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
|
|
|
- g.src='https://ssl.google-analytics.com/ga.js';
|
|
|
- s.parentNode.insertBefore(g,s)}(document,'script'));
|
|
|
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
|
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
|
+ 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');
|
|
|
+
|
|
|
+ ga('set', 'anonymizeIp', true);
|
|
|
+ ga('create', '{{ google_analytics.ga_key }}', 'auto');
|
|
|
+ ga('send', 'pageview');
|
|
|
</script>
|
|
|
{%- endif %}
|
|
|
|