{% if jekyll.environment == 'production' and site.production_google_analytics %} {%- assign GA_ID = site.production_google_analytics -%} <script async src=“www.googletagmanager.com/gtag/js?id={{ GA_ID }}”></script> <script>
window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', '{{ GA_ID }}');
</script> {% endif %}
{% if jekyll.environment == 'development' and site.development_google_analytics %} {%- assign GA_ID = site.development_google_analytics -%} <script async src=“www.googletagmanager.com/gtag/js?id={{ GA_ID }}”></script> <script>
window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', '{{ GA_ID }}');
</script> {% endif %}