2017-04-22 23:41:03 +02:00
|
|
|
{% if site.google_analytics_key %}
|
2019-07-27 15:42:45 +02:00
|
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics_key }}"></script>
|
2017-04-22 23:41:03 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
var _gaq = _gaq || [];
|
|
|
|
_gaq.push(['_setAccount', '{{ site.google_analytics_key }}']);
|
|
|
|
_gaq.push(['_trackPageview']);
|
|
|
|
|
|
|
|
(function() {
|
|
|
|
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
|
|
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
|
|
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
|
|
|
})();
|
|
|
|
|
2019-07-27 15:42:45 +02:00
|
|
|
|
|
|
|
window.dataLayer = window.dataLayer || [];
|
|
|
|
function gtag(){dataLayer.push(arguments);}
|
|
|
|
gtag('js', new Date());
|
|
|
|
gtag('config', '{{ site.google_analytics_key }}');
|
2017-04-22 23:41:03 +02:00
|
|
|
</script>
|
|
|
|
{% endif %}
|