diff --git a/assets/js/matomo-tracking.js b/assets/js/matomo-tracking.js index d5eebc3..3f6cfdb 100644 --- a/assets/js/matomo-tracking.js +++ b/assets/js/matomo-tracking.js @@ -17,7 +17,6 @@ _paq.push(['enableLinkTracking']); var s = d.getElementsByTagName('script')[0]; g.type = 'text/javascript'; - g.async = true; g.defer = true; g.src = matomoUrl + '/piwik.js'; s.parentNode.insertBefore(g, s); diff --git a/layouts/partials/matomo-tracking.html b/layouts/partials/matomo-tracking.html index 0231d43..7ff06ae 100644 --- a/layouts/partials/matomo-tracking.html +++ b/layouts/partials/matomo-tracking.html @@ -1,7 +1,7 @@ {{- if .Site.IsServer -}} {{ $trackingScript := resources.Get "js/matomo-tracking.js" }} - + {{- else -}} {{ $trackingScript := resources.Get "js/matomo-tracking.js" | minify | fingerprint }} - + {{- end -}} diff --git a/layouts/shortcodes/matomo-optout.html b/layouts/shortcodes/matomo-optout.html index 5160f5f..1a40f78 100644 --- a/layouts/shortcodes/matomo-optout.html +++ b/layouts/shortcodes/matomo-optout.html @@ -3,17 +3,17 @@ {{- $promisePolyfill := resources.Get "js/promise-polyfill.js" | minify | fingerprint -}} {{- $fetchJsonp := resources.Get "js/fetch-jsonp.js" -}} {{ $matomoOptout := resources.Get "js/matomo-optout.js" }} - + {{- if .Site.IsServer -}} {{ $matomoOptoutBundle := slice $fetchJsonp $matomoOptout | resources.Concat "js/matomo-optout.js" }} - + {{- if ne $.Site.Params.matomo.stylefromassets false -}} {{ $matomoStyle := resources.Get "css/matomo-optout.css" }} {{- end -}} {{- else -}} {{ $matomoOptoutBundle := slice $fetchJsonp $matomoOptout | resources.Concat "js/matomo-optout.js" | minify | fingerprint }} - + {{- if ne $.Site.Params.matomo.stylefromassets false -}} {{ $matomoStyle := resources.Get "css/matomo-optout.css" | minify | fingerprint }} diff --git a/src/js/matomo-tracking.js b/src/js/matomo-tracking.js index 1896bff..2dfc934 100644 --- a/src/js/matomo-tracking.js +++ b/src/js/matomo-tracking.js @@ -19,7 +19,6 @@ _paq.push(['enableLinkTracking']); const s = d.getElementsByTagName('script')[0]; g.type = 'text/javascript'; - g.async = true; g.defer = true; g.src = `${matomoUrl}/piwik.js`; s.parentNode.insertBefore(g, s);