Nah, but keep the client load only
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -9,10 +9,7 @@
|
|||||||
const { page } = stores()
|
const { page } = stores()
|
||||||
|
|
||||||
// Init Google Analytics
|
// Init Google Analytics
|
||||||
if (typeof window !== 'undefined'
|
if (typeof window !== 'undefined' && process.env.NODE_ENV !== 'development') {
|
||||||
&& process.env.NODE_ENV !== 'development'
|
|
||||||
&& navigator.userAgent.indexOf('Speed Insights') == -1
|
|
||||||
) {
|
|
||||||
window.dataLayer = window.dataLayer || []
|
window.dataLayer = window.dataLayer || []
|
||||||
window.gtag = function gtag() {
|
window.gtag = function gtag() {
|
||||||
window.dataLayer.push(arguments)
|
window.dataLayer.push(arguments)
|
||||||
@@ -26,10 +23,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
{#if
|
{#if process.env.NODE_ENV !== 'development'}
|
||||||
process.env.NODE_ENV !== 'development'
|
|
||||||
&& navigator.userAgent.indexOf('Speed Insights') == -1
|
|
||||||
}
|
|
||||||
<script async src="https://www.googletagmanager.com/gtag/js?id={id}"></script>
|
<script async src="https://www.googletagmanager.com/gtag/js?id={id}"></script>
|
||||||
{/if}
|
{/if}
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|||||||
Reference in New Issue
Block a user