From 5571673f08b6c3ae5386199d98f1529cf7dc2cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 19 Feb 2018 09:26:13 +0100 Subject: [PATCH] Migrate from analytics.js to gtag.js We should move this to the internal Hugo template when tested. --- themes/gohugoioTheme/layouts/_default/baseof.html | 2 +- themes/gohugoioTheme/layouts/partials/gtag.html | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 themes/gohugoioTheme/layouts/partials/gtag.html diff --git a/themes/gohugoioTheme/layouts/_default/baseof.html b/themes/gohugoioTheme/layouts/_default/baseof.html index b7ad4f10e..3a0a9f7f2 100755 --- a/themes/gohugoioTheme/layouts/_default/baseof.html +++ b/themes/gohugoioTheme/layouts/_default/baseof.html @@ -34,7 +34,7 @@ {{- template "_internal/twitter_cards.html" . -}} {{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }} - {{ template "_internal/google_analytics_async.html" . }} + {{ partial "gtag" . }} {{ end }} diff --git a/themes/gohugoioTheme/layouts/partials/gtag.html b/themes/gohugoioTheme/layouts/partials/gtag.html new file mode 100644 index 000000000..3e56e156d --- /dev/null +++ b/themes/gohugoioTheme/layouts/partials/gtag.html @@ -0,0 +1,10 @@ +{{ with .Site.GoogleAnalytics }} + + +{{ end }} \ No newline at end of file