diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | exampleSite/content/post/readme.md | 2 | ||||
-rw-r--r-- | layouts/partials/footer.html | 5 | ||||
-rw-r--r-- | layouts/partials/head.html | 4 |
4 files changed, 6 insertions, 7 deletions
@@ -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 }} + |