bmen-jekyll/_includes/analytics.html

11 lines
476 B
HTML
Raw Permalink Normal View History

2020-10-10 08:35:47 +00:00
{%- if jekyll.environment == 'production' and site.analytics.enabled == true -%}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.analytics.google.tracking_id }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ site.analytics.google.tracking_id }}');
</script>
{%- endif -%}