A lightweight analytics abstraction library for tracking page views, custom events, and identifying visitors across any third-party tool.
Analytics is a lightweight JavaScript library that provides a unified, pluggable abstraction layer for tracking page views, custom events, and identifying visitors. It solves the complexity of maintaining and switching between multiple analytics providers by allowing developers to integrate and manage various tools through a single API.
Developers and teams building web applications who need to integrate multiple analytics services (like Google Analytics, Mixpanel, or custom backends) without vendor lock-in and with minimal code changes.
Developers choose Analytics because it offers a consistent API across all providers, reduces maintenance overhead when adding or removing tools, and includes powerful features like offline support, lifecycle hooks, and a robust plugin ecosystem for extensibility.
Lightweight analytics abstraction layer for tracking page views, custom events, & identifying visitors
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports over 30 official plugins for major providers (e.g., Google Analytics, Mixpanel) and community plugins, allowing seamless integration without vendor lock-in, as shown in the comprehensive plugins list.
Works identically in browser and Node.js environments, enabling consistent tracking for both client-side and server-side rendered applications, a core feature highlighted in the README.
Offers 40+ event listeners (e.g., pageStart, trackEnd) for injecting custom logic or modifying data, with detailed documentation on events like 'campaign' and 'userIdChanged'.
Includes conditional script loading for privacy compliance and offline event queuing to handle network issues, respecting Do Not Track settings as per the project philosophy.
Many official plugins are in early versions (e.g., 0.x), indicating potential instability or breaking changes, which can lead to maintenance overhead as the ecosystem evolves.
Setting up requires managing separate configurations for each plugin, which can be error-prone and more complex than dropping in a single provider's script, especially for beginners.
The abstraction layer adds JavaScript execution time, and while lightweight, it may introduce noticeable overhead for high-frequency event tracking in performance-critical applications.
analytics is an open-source alternative to the following products: