Google analytics only enabled for production environment
This commit is contained in:
parent
a01c9dd184
commit
558425fa80
@ -102,7 +102,7 @@
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
{% if jekyll.environment == 'production' and site.google_analytics.id != empty and site.google_analytics.id %}
|
||||
<!-- Google Tag Manager -->
|
||||
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
||||
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
||||
@ -110,6 +110,7 @@
|
||||
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
||||
})(window,document,'script','dataLayer','GTM-W4PKSB86');</script>
|
||||
<!-- End Google Tag Manager -->
|
||||
{% endif %}
|
||||
|
||||
{% unless site.theme_mode %}
|
||||
{% include mode-toggle.html %}
|
||||
|
||||
@ -10,21 +10,23 @@ layout: compress
|
||||
{% include lang.html %}
|
||||
|
||||
{% capture prefer_mode %}
|
||||
{% if site.theme_mode %}
|
||||
data-mode="{{ site.theme_mode }}"
|
||||
{% endif %}
|
||||
{% if site.theme_mode %}
|
||||
data-mode="{{ site.theme_mode }}"
|
||||
{% endif %}
|
||||
{% endcapture %}
|
||||
|
||||
<!-- `site.alt_lang` can specify a language different from the UI -->
|
||||
<html lang="{{ site.alt_lang | default: site.lang }}" {{ prefer_mode }}>
|
||||
{% include head.html %}
|
||||
{% include head.html %}
|
||||
|
||||
<body>
|
||||
<body>
|
||||
|
||||
{% if jekyll.environment == 'production' and site.google_analytics.id != empty and site.google_analytics.id %}
|
||||
<!-- Google Tag Manager (noscript) -->
|
||||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W4PKSB86"
|
||||
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W4PKSB86" height="0" width="0"
|
||||
style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<!-- End Google Tag Manager (noscript) -->
|
||||
{% endif %}
|
||||
|
||||
{% include sidebar.html lang=lang %}
|
||||
|
||||
@ -45,22 +47,10 @@ layout: compress
|
||||
</button>
|
||||
|
||||
{% if site.pwa.enabled %}
|
||||
<div
|
||||
id="notification"
|
||||
class="toast"
|
||||
role="alert"
|
||||
aria-live="assertive"
|
||||
aria-atomic="true"
|
||||
data-bs-animation="true"
|
||||
data-bs-autohide="false"
|
||||
>
|
||||
<div id="notification" class="toast" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true"
|
||||
data-bs-autohide="false">
|
||||
<div class="toast-header">
|
||||
<button
|
||||
type="button"
|
||||
class="btn-close ms-auto"
|
||||
data-bs-dismiss="toast"
|
||||
aria-label="Close"
|
||||
></button>
|
||||
<button type="button" class="btn-close ms-auto" data-bs-dismiss="toast" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="toast-body text-center pt-0">
|
||||
<p class="px-2 mb-3">{{ site.data.locales[lang].notification.update_found }}</p>
|
||||
@ -78,5 +68,6 @@ layout: compress
|
||||
{% endif %}
|
||||
|
||||
{% include_cached search-loader.html %}
|
||||
</body>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
Reference in New Issue
Block a user