From db5920035d4e1e01dff04e774d8490097fc20c96 Mon Sep 17 00:00:00 2001 From: David Wahyu Pratomo <22112331+davidwah@users.noreply.github.com> Date: Wed, 23 Mar 2022 20:00:40 +0700 Subject: [PATCH 1/2] update Google Analytics --- layouts/partials/head.html | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 9c143c47..712febfc 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -21,21 +21,19 @@ - {{ "" | safeHTML }} + + {{ if and (hugo.IsProduction) (.Site.Params.googleAnalyticsID) }} + {{ partial "analytics-gtag.html" . }} + {{ end }} + + + - \ No newline at end of file + From 74d02170ed66afb47c5a935c85d19529699eafeb Mon Sep 17 00:00:00 2001 From: David Wahyu Pratomo <22112331+davidwah@users.noreply.github.com> Date: Wed, 23 Mar 2022 20:01:53 +0700 Subject: [PATCH 2/2] update Google Analytics --- exampleSite/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index a741cd69..e6f6c398 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -84,7 +84,7 @@ home = "Home" description = "This is meta description" author = "Themefisher" # Google Analitycs -googleAnalitycsID = "Your ID" +GoogleAnalyticsID = "Your ID" # Contact Information mobile = "0124857985320" email = "demo@email.com"