Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/gohugoioTheme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Mokkentstorm <nielsmokkenstorm@gmail.com>2020-07-11 13:01:29 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-07-11 14:25:15 +0300
commitb0dfe471654f683b4b6722fa2fcc4db5f6a85b59 (patch)
tree756bc3c84065f5cce8a43c728da449f6d0f2cefa
parent7d6558bb7c9f2a372409ceb69ee4f9bd611507c6 (diff)
Stop waiting for async state in gtag handler
Closes [#1169](https://github.com/gohugoio/hugoDocs/issues/1169)
-rw-r--r--layouts/partials/gtag.html5
-rw-r--r--layouts/partials/home-page-sections/sponsors.html2
2 files changed, 3 insertions, 4 deletions
diff --git a/layouts/partials/gtag.html b/layouts/partials/gtag.html
index c7892650..2cedc384 100644
--- a/layouts/partials/gtag.html
+++ b/layouts/partials/gtag.html
@@ -17,10 +17,9 @@ var trackOutboundLink = function(id, url) {
gtag('event', 'click', {
'event_category': 'outbound',
'event_label': id,
- 'transport_type': 'beacon',
- 'event_callback': function(){document.location = url;}
+ 'transport_type': 'beacon'
});
}
</script>
-{{ end }} \ No newline at end of file
+{{ end }}
diff --git a/layouts/partials/home-page-sections/sponsors.html b/layouts/partials/home-page-sections/sponsors.html
index fa179f7f..f9f5ec58 100644
--- a/layouts/partials/home-page-sections/sponsors.html
+++ b/layouts/partials/home-page-sections/sponsors.html
@@ -13,7 +13,7 @@
{{ $url := printf "%s?%s" . (querify "utm_source" "homepage" "utm_medium" "banner" "utm_campaign" "hugosponsor") | safeURL }}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq $.cx.Site.Params.env "production") }}
{{ $gtagID := printf "Sponsor %s %s" $banner.name $gtag | title }}
- <a href="{{ $url }}" onclick="trackOutboundLink({{ printf "'%s', '%s'" $gtagID $url | safeJS }}); return false;" class="grow">
+ <a href="{{ $url }}" onclick="trackOutboundLink({{ printf "'%s', '%s'" $gtagID $url | safeJS }});" class="grow">
{{ else }}
<a href="{{ $url }}" class="grow">
{{ end }}