boday_tf/boday_it/templates/includes/analytics.html

12 lines
559 B
HTML
Raw Permalink Normal View History

2020-01-27 17:38:52 +00:00
{# INFO: from html5 boilerplate https://github.com/h5bp/html5-boilerplate/blob/master/index.html #}
{% if GOOGLE_ANALYTICS_ID %}
<script>
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='//www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','{{ GOOGLE_ANALYTICS_ID }}','auto');ga('send','pageview');
</script>
{% endif %}