cycat-project-website/_includes/google-analytics.html

11 lines
411 B
HTML
Raw Normal View History

2018-12-09 11:56:24 +01:00
{% if site.google_analytics_id %}
2018-12-09 08:21:01 +01:00
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics_id }}"></script>
2018-12-09 08:21:01 +01:00
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ site.google_analytics_id }}');
2018-12-09 08:21:01 +01:00
</script>
2018-12-09 11:56:24 +01:00
{% endif %}