Skip to content

Commit

Permalink
Merge pull request kubernetes#36010 from chalin/chalin-im-use-ga4-id-…
Browse files Browse the repository at this point in the history
…2022-08-16

Google analytics: use GA4 site tag
  • Loading branch information
k8s-ci-robot authored Aug 24, 2022
2 parents 9401ab7 + 3db01bf commit f98437f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ anchor = "smart"

[services]
[services.googleAnalytics]
# Comment out the next line to disable GA tracking. Also disables the feature described in [params.ui.feedback].
# Fake ID in support of [params.ui.feedback]. The real GA ID is set in the Netlify config.
id = "UA-00000000-0"

[params]
Expand Down
13 changes: 1 addition & 12 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@
{{- else -}}
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
{{- end -}}
{{- if in (slice "production" "nonprod") hugo.Environment -}}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-36037335-10"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-36037335-10');
</script>
{{- end -}}

<!-- alternative translations -->
{{ range .Translations -}}
Expand All @@ -36,7 +25,7 @@
{{- template "_internal/schema.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
{{- if hugo.IsProduction -}}
{{ template "_internal/google_analytics_async.html" . }}
{{ template "_internal/google_analytics.html" . }}
{{ end }}
{{ partialCached "head-css.html" . "asdf" }}
<script
Expand Down

0 comments on commit f98437f

Please sign in to comment.