From 25dffe4ac3e98d7b6c1ed17f054cdac02b99b6e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Thu, 1 Mar 2018 11:02:23 +0100 Subject: [PATCH] Send custom dimensions in GA --- themes/gohugoioTheme/layouts/partials/gtag.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/gohugoioTheme/layouts/partials/gtag.html b/themes/gohugoioTheme/layouts/partials/gtag.html index 89479ac34..d4924a698 100644 --- a/themes/gohugoioTheme/layouts/partials/gtag.html +++ b/themes/gohugoioTheme/layouts/partials/gtag.html @@ -6,7 +6,7 @@ gtag('js', new Date()); {{ $site := $.Site.BaseURL | replaceRE "^https?://(www\\.)?([^/]+).*" "$2" }} - gtag('config', '{{ . }}', {'site': '{{ $site }}', 'branch': '{{ getenv "BRANCH" }}'}); + gtag('config', '{{ . }}', {'dimension1': '{{ $site }}', 'dimension2': '{{ getenv "BRANCH" }}'}); /** * Function that tracks a click on an outbound link in Analytics.