Skip to content

Commit

Permalink
Merge pull request #579 from plausible/fetch-with-keepalive
Browse files Browse the repository at this point in the history
Add fetch-with-keepalive support to docs
  • Loading branch information
macobo authored Jan 23, 2025
2 parents de4f8e9 + 5c4486f commit 0e7e378
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion static/js/tracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ const script = document.createElement('script')

script.defer = true
script.dataset.domain = 'plausible.io'
script.dataset.allowFetch = 'true'
script.src = 'https://plausible.io/js/script.pageview-props.pageleave.js'
script.setAttribute('event-browser_language', navigator.language || navigator.userLanguage)

document.getElementsByTagName('head')[0].appendChild(script)
document.getElementsByTagName('head')[0].appendChild(script)

0 comments on commit 0e7e378

Please sign in to comment.