Skip to content

Commit

Permalink
Merge pull request #107 from ai-models/analytics
Browse files Browse the repository at this point in the history
google analytics only in prod
  • Loading branch information
neural-loop authored Dec 31, 2023
2 parents ff558a5 + cd0568a commit beac88e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion themes/hugoplate/layouts/partials/essentials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
{{/* template "_internal/google_analytics.html" . */}}
{{/* end */}}

{{ if hugo.IsProduction }}
<script async src="https://www.googletagmanager.com/gtag/js?id=G-WLX91Y92H4"></script>
<script>
window.dataLayer = window.dataLayer || [];
Expand All @@ -47,7 +48,7 @@

gtag('config', 'G-WLX91Y92H4');
</script>

{{ end }}
<!-- google tag manager -->
{{/* partialCached "gtm.html" . */}}

Expand Down

0 comments on commit beac88e

Please sign in to comment.