plausible / plausible-tracker

Frontend library to interact with Plausible Analytics
https://github.com/plausible/plausible-tracker
MIT License
214 stars 46 forks source link

Honor target attribute for outbound link tracking by relying on `navigator.sendBeacon` #54

Open suabahasa opened 1 year ago

suabahasa commented 1 year ago

Description

Continue the effort from the PR https://github.com/plausible/plausible-tracker/pull/45. The outbound link tracking event is sent with navigator.sendBeacon to honor the target attribute for outbound link tracking.

uBlock Origin prevents ping requests with navigator.sendBeacon when the "Disable hyperlink auditing" option is enabled https://github.com/gorhill/uBlock/wiki/Dashboard:-Settings#disable-hyperlink-auditing

Related Issue

Fixes https://github.com/plausible/plausible-tracker/issues/12 Implement https://github.com/plausible/plausible-tracker/issues/16

Screenshots or GIFs (if appropriate):

Types of changes

Checklist: