mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-09 14:59:45 +00:00
Use new Google Analytics template to accommodate both GA4 and GS3 in header (#341)
This commit is contained in:
parent
591eb5ab07
commit
e7e8344a51
4 changed files with 6 additions and 3 deletions
|
@ -189,7 +189,7 @@ You can easily use Plausible.io for analytics by setting `plausible = true` in y
|
||||||
|
|
||||||
## Google Analytics
|
## Google Analytics
|
||||||
|
|
||||||
Set `googleAnalytics` in `config.toml` to activate Hugo's [internal Google Analytics template](https://gohugo.io/templates/internal/#google-analytics).
|
Set `googleAnalytics` in `config.toml` to activate Hugo's [internal Google Analytics template](https://gohugo.io/templates/internal/#google-analytics). This supports both Google Analytics 3 (Universal Analytics) and Google Analytics 4. Google Analytics 3 tracking id is of the form 'UA-PROPERTY_ID', and Google Analytics 4 tracking is of the form 'G-MEASUREMENT_ID'.
|
||||||
|
|
||||||
## Disqus
|
## Disqus
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
{{ partial "head/metadata.html" . }}
|
||||||
|
|
||||||
{{ define "title" }}
|
{{ define "title" }}
|
||||||
<h1 class="bold-title is-1">{{ i18n "404_title" . }}</h1>
|
<h1 class="bold-title is-1">{{ i18n "404_title" . }}</h1>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
{{ $scripts := slice $jQuery $index | resources.Concat "js/bundle.js" | fingerprint }}
|
{{ $scripts := slice $jQuery $index | resources.Concat "js/bundle.js" | fingerprint }}
|
||||||
<script src="{{ $scripts.Permalink }}" integrity="{{ $scripts.Data.Integrity }}"></script>
|
<script src="{{ $scripts.Permalink }}" integrity="{{ $scripts.Data.Integrity }}"></script>
|
||||||
|
|
||||||
{{ template "_internal/google_analytics_async.html" . }}
|
|
||||||
|
|
||||||
<!-- Custom JavaScript -->
|
<!-- Custom JavaScript -->
|
||||||
{{ range .Site.Params.customJS -}}
|
{{ range .Site.Params.customJS -}}
|
||||||
{{ $script := resources.Get . | minify }}
|
{{ $script := resources.Get . | minify }}
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
{{ template "_internal/google_analytics.html" . }}
|
||||||
|
|
||||||
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
||||||
<meta name="HandheldFriendly" content="True">
|
<meta name="HandheldFriendly" content="True">
|
||||||
|
|
Loading…
Reference in a new issue