Skip to content

Commit

Permalink
Google analytics: make it work for our GA4 property (kedacore#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin authored Feb 18, 2022
1 parent 50e80a6 commit 3609250
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
build: clean
hugo -e development -DFE

clean:
rm -rf public resources
rm -rf public/* resources

yarn:
yarn
Expand All @@ -14,8 +17,8 @@ production-build: clean
--minify

preview-build: clean
hugo \
--baseURL $(DEPLOY_PRIME_URL) \
hugo -e development \
--baseURL "$(DEPLOY_PRIME_URL)" \
--buildDrafts \
--buildFuture \
--minify
Expand Down
4 changes: 3 additions & 1 deletion layouts/partials/meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@
<meta property="og:image:alt" content="{{ $imgAlt }}">
<meta property="og:locale" content="{{ $locale }}">

{{ template "_internal/google_analytics_async.html" . -}}
{{ if hugo.IsProduction -}}
{{ template "_internal/google_analytics.html" . -}}
{{ end -}}

0 comments on commit 3609250

Please sign in to comment.