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

github.com/zhaohuabing/hugo-theme-cleanwhite.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhaohuabing <zhaohuabing@gmail.com>2022-11-07 12:20:37 +0300
committerzhaohuabing <zhaohuabing@gmail.com>2022-11-07 12:20:37 +0300
commit5050d9e041422022d7c3e82fbca0e4ba1e173cc2 (patch)
tree4f044aa7ad599d692954992cd1a77ff785bf2fd1
parent706f0b60f700e105c4481a5daf669aa068122b7e (diff)
upgrade to google analytics 4HEADmaster
Signed-off-by: zhaohuabing <zhaohuabing@gmail.com>
-rw-r--r--README.md2
-rw-r--r--exampleSite/content/post/readme.md2
-rw-r--r--layouts/partials/footer.html5
-rw-r--r--layouts/partials/head.html4
4 files changed, 6 insertions, 7 deletions
diff --git a/README.md b/README.md
index c79b42f..642100d 100644
--- a/README.md
+++ b/README.md
@@ -174,7 +174,7 @@ Open search page in your browser: http://localhost:1313/search
You can optionally enable Google or Baidu Analytics. Type your tracking code in the
```toml
-googleAnalytics = "UA-XXXXX-X"
+googleAnalytics = "G-XXXXX"
ba_track_id = "XXXXXXXXXXXXXXXX"
```
Leave the `googleAnalytics` or 'ba_track_id ' key empty to disable it.
diff --git a/exampleSite/content/post/readme.md b/exampleSite/content/post/readme.md
index 3c5f7e6..823df49 100644
--- a/exampleSite/content/post/readme.md
+++ b/exampleSite/content/post/readme.md
@@ -134,7 +134,7 @@ Open search page in your browser: http://localhost:1313/search
You can optionally enable Google or Baidu Analytics. Type your tracking code in the
```toml
-googleAnalytics = "UA-XXXXX-X"
+googleAnalytics = "G-XXXXX"
ba_track_id = "XXXXXXXXXXXXXXXX"
```
Leave the `googleAnalytics` or 'ba_track_id ' key empty to disable it.
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 281587e..774376e 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -310,11 +310,6 @@
</script>
{{ end }}
-{{ if .Site.GoogleAnalytics }}
-{{ template "_internal/google_analytics_async.html" . }}
-{{ end }}
-
-
<!-- Side Catalog -->
{{ if not (eq (.Param "showtoc") false) }}
<script type="text/javascript">
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 479b44f..75dbd9a 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -89,3 +89,7 @@
</head>
+{{ if .Site.GoogleAnalytics }}
+{{ template "_internal/google_analytics.html" . }}
+{{ end }}
+