Skip to content

Commit 33b7e94

Browse files
committed
Only load analytics in production
1 parent c810402 commit 33b7e94

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/source/_layouts/master.blade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
</head>
2424
<body data-sidebar-visible="true" class="font-sans font-normal text-slate-darker leading-normal">
2525
@yield('body')
26+
@if ($page->production)
2627
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-109068504-1"></script>
2728
<script>
2829
window.dataLayer = window.dataLayer || [];
@@ -31,5 +32,6 @@ function gtag(){dataLayer.push(arguments);}
3132
3233
gtag('config', 'UA-109068504-1');
3334
</script>
35+
@endif
3436
</body>
3537
</html>

0 commit comments

Comments
 (0)