plausible-events
This small library allows to easily use the Plausible Events API.
- Privacy-focused.
Uses the open-source and privacy-focused Plausible Analytics.
IP addresses are only used to correctly count unique users and for approximate geolocation, but are never stored (also not by ipify, which is used to obtain the public IP address of the caller).
- Doesn't slow down the main application.
Calls to record events are non-blocking, the necessary http requests happen on a separate thread.
- Doesn't show errors, but tries again.
Failed event recordings are re-tried indefinitely, i.e. events aren't lost if network connectivity is temporarily interrupted.
Examples
from plausible_events import PlausibleEvents
pe = PlausibleEvents(domain='my.domain.com')
pe.pageview('/login/user')
pe.event('my event', dict(os='mac', var='foo'))
What is Plausible Analytics?
Plausible Analytics is a transparent and fully open source analytics software. From their website:
Plausible is open source analytics. Our source code is available and accessible on GitHub so anyone can read it, inspect it and review it to verify that our actions match with our words. We welcome feedback and have a public roadmap. If you're happy to manage your own infrastructure, you can self-host Plausible too.