forked from plausible/analytics
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Fetch with keepalive is a
widely-supported which indicates whether the browser will keep the associated request alive if the page that initiated it is unloaded before the request is complete.
We're hoping it will improve event capture rates for pageleave and pageview events when the user closes the tab
To use it, we also need to start using fetch (with fallback to xhr).
For extra safety, we will only deploy this on plausible.io initially. This will ensure that if there are issues we will be able to react without affecting any other customers.
I tested this locally by adding temporary logging to the script:
- Modifying lib/plausible_web/templates/layout/_tracking.html.heex to track locally
- Making fetch the default and running the test suite.
Companion PR: plausible/docs#579
TODO after this PR:
- Companion docs PR
- Purge bunny cache
- Make fetch the default request method without data-property
Metadata
Metadata
Assignees
Labels
No labels