{"repo":"vitonsky/plausible-client","free":true,"listed":false,"github":"https://github.com/vitonsky/plausible-client","clone":"git clone https://github.com/vitonsky/plausible-client.git","description":"Plausible client to collect analytics in browser with no hassle","language":"TypeScript","stars":22,"topics":["analytics","plausible","plausible-analytics","tracking","engagement","engagement-analytics","engagement-metrics","telemetry","telemetry-client"],"license":"MIT","category":"analytics","readme_excerpt":"Plausible client to collect analytics in browser with no hassle. Why? There are official plausible-tracker package, it have quite few code, but have a lot of bugs like - \"enableAutoOutboundTracking breaks target=\" blank\" and probably noopener security\" #12 - uses XHR API that loses analytics on static sites with no SPA approach (like Astro does) #16 - uses callbacks, that will not be called on localhost, that force users write code that works different locally and on production Current package is lightweight too, but written and maintained by those who use a plausible analytics on production. See dogfooding. Usage Install package with npm i plausible-client Create instance and play Automatically track pageviews To track page views automatically, call enableAutoPageviews : Automatically track outbound clicks To track outbound clicks automatically (same-origin links are skipped automatically), call enableAutoOutboundTracking : Track any link clicks For fine-grained control over which links to track, use enableLinkClicksCapture directly: Score user sessions To collect device/region signals and detect trivial bots, call enableSessionScoring : The Session scored event includes these props: Prop Description --- --- botScore Numeric score — ≥ 3 indicates a likely bot botSignals Comma-separated triggered signals, e.g. webdriver,headless ua sessionAge Seconds since the first recorded visit timeZone IANA timezone resolved from Intl.DateTimeFormat language navigator.language languages n","default_branch":null,"files":null,"tree":[],"storefront":"/r/vitonsky","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/vitonsky/plausible-client/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}