Analytics: An Open-source Self-hosted Web Analytics
Lightweight analytics abstraction layer for tracking page views, custom events, & identifying visitors
What is Analytics?
Analytics is a free open-source lightweight analytics abstraction library for tracking page views, custom events, & identify visitors.
Features
- Extendable - Bring your own third-party tool & plugins
- Test & debug analytics integrations with time travel & offline mode
- Add functionality/modify tracking calls with baked in lifecycle hooks
- Isomorphic. Works in browser & on server
- Queues events to send when analytic libraries are loaded
- Conditionally load third party scripts
- Works offline
- TypeScript support
- Developer-friendly API.
- Easy to integrate and add to any JavaScript web project.
Why?
Companies frequently change analytics requirements based on evolving needs. This results in a lot of complexity, maintenance, & extra code when adding/removing analytic services to a site or application.
This library aims to solve that with a simple pluggable abstraction layer.
Driving philosophy:
- You should never be locked into an analytics tool
- DX is paramount. Adding & removing analytic tools from your application should be easy
- Respecting visitor privacy settings & allowing for opt-out mechanisms is crucial
- A pluggable API makes adding new business requests easy
To add or remove an analytics provider, adjust the plugins you load into analytics during initialization.
Plugins and Third-party Analytics
Analytics currently supports the following services:
- Google Analytics
- Google Tag Manager
- Segment
- Customer.io
- HubSpot
- Snowplow Analytics
- Mixpanel
- Amplitude
- AWS Pinpoint
- FullStory
- Intercom
- CrazyEgg
- GoSquared
- Simple Analytics
- Ownstats
- Perfume.js
- Countly
- Custify
License
- MIT license