Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/heyeshuang/hugo-theme-tokiwa.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHe Yeshuang <yeshuanghe@gmail.com>2021-08-04 05:52:59 +0300
committerHe Yeshuang <yeshuanghe@gmail.com>2021-08-04 05:52:59 +0300
commit93dac05cfdc09212d9397c5a02927acc5ee8a2b5 (patch)
treee4f889ac64365349996ca282bd0ca9e9cb01e1dc
parent2cbf13a08f6986a3aa8a7772d732c1ce9d07eb01 (diff)
Google Analytics v4
see https://gohugo.io/templates/internal/#use-the-google-analytics-template
-rw-r--r--README.md2
-rw-r--r--exampleSite/config.toml2
-rwxr-xr-xlayouts/_default/baseof.html2
3 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index 25d525a..70334de 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@ $ git submodule add https://github.com/heyeshuang/hugo-theme-tokiwa.git themes/h
```toml
disqusShortname = "YOURSHORTNAME"
-googleAnalytics = "UA-1234567890"
+googleAnalytics = "UA-1234567890" # or "G-xxxxxxxx" in Google Analytics v4, in hugo v0.82+
[params]
description = """
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 1932f49..e047352 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -5,7 +5,7 @@ copyright = "Copyright © 2008–2019"
disqusShortname = "YOURSHORTNAME"
enableInlineShortcodes = true
footnoteReturnLinkContents = "^"
-googleAnalytics = "UA-FAKE"
+googleAnalytics = "UA-FAKE" ## or "G-xxxxxxxx" in Google Analytics v4, in hugo v0.82+
hasCJKLanguage = true
languageCode = "en"
theme = "hugo-theme-tokiwa"
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index f433748..cd857a0 100755
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -33,7 +33,7 @@
<link rel="feed" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ site.Title }}">
{{end}}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
- {{ template "_internal/google_analytics_async.html" . }}
+ {{ template "_internal/google_analytics.html" . }}
{{ end }}
{{ if or .Params.math .Site.Params.math }}
{{ partial "math.html" . }}