Skip to content

Commit da69636

Browse files
authored
Conditionally load Google Analytics only in production (#117)
1 parent 3ebcd17 commit da69636

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

web/html/layouts/main.tmpl.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<html lang="en">
44

55
<head>
6+
{{if ne .CCEnv "development" -}}
67
<!-- Google tag (gtag.js) -->
78
<script async src="https://www.googletagmanager.com/gtag/js?id=G-NX7VL0ZZMV"></script>
89
<script>
@@ -12,6 +13,7 @@
1213

1314
gtag('config', 'G-NX7VL0ZZMV');
1415
</script>
16+
{{end -}}
1517
<meta charset="utf-8">
1618
<meta name="viewport" content="width=device-width, initial-scale=1">
1719
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">

0 commit comments

Comments
 (0)