mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 20:17:17 +00:00
Send custom dimensions in GA
This commit is contained in:
1 file changed
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
gtag('js', new Date());
|
gtag('js', new Date());
|
||||||
|
|
||||||
{{ $site := $.Site.BaseURL | replaceRE "^https?://(www\\.)?([^/]+).*" "$2" }}
|
{{ $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.
|
* Function that tracks a click on an outbound link in Analytics.
|
||||||
|
|||||||
Reference in new issue
Block a user