diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2024-01-27 10:47:28 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2024-01-27 10:47:28 +0100 |
commit | fc7de7136acbcf0aef54ae8460c7702bc83709be (patch) | |
tree | c109bb4dd1f1b054db476e7e4117f79bdd62ec9e /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/gtag.html | |
parent | 1083bf7c08e6f35826279065b8a09a16cc991c7f (diff) |
docs: Prepare for new sub tree
See #11925
Diffstat (limited to 'docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/gtag.html')
-rw-r--r-- | docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/gtag.html | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/gtag.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/gtag.html deleted file mode 100644 index 7c6a9ade5..000000000 --- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/gtag.html +++ /dev/null @@ -1,25 +0,0 @@ -{{ with site.Config.Services.GoogleAnalytics.ID }} -<script async src="https://www.googletagmanager.com/gtag/js?id={{ . }}"></script> -<script> - window.dataLayer = window.dataLayer || []; - function gtag(){dataLayer.push(arguments);} - gtag('js', new Date()); - - {{ $site := $.Site.BaseURL | replaceRE "^https?://(www\\.)?([^/]+).*" "$2" }} - gtag('config', '{{ . }}', {'anonymize_ip': true, 'dimension1': '{{ $site }}', 'dimension2': '{{ getenv "BRANCH" }}'}); - -/** -* Function that tracks a click on an outbound link in Analytics. -* Setting the transport method to 'beacon' lets the hit be sent -* using 'navigator.sendBeacon' in browser that support it. -*/ -var trackOutboundLink = function(id, url) { - gtag('event', 'click', { - 'event_category': 'outbound', - 'event_label': id, - 'transport_type': 'beacon' - }); -} - -</script> -{{ end }} |