From eb2ac1d1bdeef7ee7773a5ec3d01cae1c152872a Mon Sep 17 00:00:00 2001 From: Daneo Van Overloop Date: Sat, 26 May 2018 18:49:25 +0200 Subject: [PATCH 1/4] [Matomo] Tracking supported. Customisable host and siteId --- layouts/partials/header.html | 1 + layouts/partials/matomo.html | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 layouts/partials/matomo.html diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 1daf3610f..2c594837b 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -17,6 +17,7 @@ {{ if .RSSLink }} {{ end }} + {{ if .Site.Params.MatomoUrl }}{{ partial "matomo.html" . }}{{ end }} {{ partial "extra-in-head.html" . }} diff --git a/layouts/partials/matomo.html b/layouts/partials/matomo.html new file mode 100644 index 000000000..ac2287d27 --- /dev/null +++ b/layouts/partials/matomo.html @@ -0,0 +1,15 @@ +{{ $siteId := cond (isset .Site.Params "matomositeid") .Site.Params.MatomoSiteId "1" }} + + From 38edc3fc5707d22bcdb80c582fd1ca3276921956 Mon Sep 17 00:00:00 2001 From: Daneo Van Overloop Date: Sat, 26 May 2018 18:49:49 +0200 Subject: [PATCH 2/4] [Matomo] Flag for prefixing Page title with domain added --- layouts/partials/matomo.html | 1 + 1 file changed, 1 insertion(+) diff --git a/layouts/partials/matomo.html b/layouts/partials/matomo.html index ac2287d27..921b71d8c 100644 --- a/layouts/partials/matomo.html +++ b/layouts/partials/matomo.html @@ -2,6 +2,7 @@ +{{ if .Site.Params.MatomoEnableFallback }} + +{{ end }} From ef06f92020c333f83ba9fcecc200e885eeff4d75 Mon Sep 17 00:00:00 2001 From: Daneo Van Overloop Date: Sat, 26 May 2018 19:29:42 +0200 Subject: [PATCH 4/4] [Matomo] Flag for client side DNT feature - defaults to true --- layouts/partials/matomo.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layouts/partials/matomo.html b/layouts/partials/matomo.html index 23ad55785..88c647b96 100644 --- a/layouts/partials/matomo.html +++ b/layouts/partials/matomo.html @@ -1,8 +1,10 @@ {{ $siteId := cond (isset .Site.Params "matomositeid") .Site.Params.MatomoSiteId "1" }} +{{ $clientSideDNT := cond (isset .Site.Params "matomoclientsidednt") .Site.Params.MatomoClientSideDNT true }}