DavidWells

DavidWells/analytics

JavaScript MIT Web Dev

Lightweight analytics abstraction layer for tracking page views, custom events, & identifying visitors

2.7k stars
263 forks
recent
GitHub +1 / week

2.7k

Stars

263

Forks

112

Open issues

30

Contributors

AI Analysis

A lightweight abstraction layer for analytics that decouples applications from specific analytics vendors through a plugin-based architecture. It's designed for teams that need to switch, add, or remove analytics tools without rewriting tracking code, and serves developers building applications with evolving analytics requirements.

Web Dev Library Discovery value: 5/10
Documentation 8/10
Activity 8/10
Community 7/10
Code quality 6/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 7/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

analytics-abstraction plugin-architecture event-tracking vendor-agnostic privacy-compliant
Actively maintained Well documented MIT licensed Niche/specialized use case Beginner friendly Production ready
Deep Analysis · Based on README and public signals
4d ago

Lightweight abstraction layer for multi-provider analytics tracking with plugin architecture

analytics is a JavaScript library providing a vendor-agnostic wrapper around analytics services (Google Analytics, Segment, etc.). It enables developers to swap analytics providers without rewriting tracking code. The project serves teams managing multiple analytics tools or anticipating provider changes. Adoption appears moderate and specialized; the library occupies a deliberate niche rather than competing for mass-market dominance.

Origin

Created October 2018 by David Wells. The project emerged from the practical problem of vendor lock-in: as companies evolve their analytics stack, rewriting instrumentation becomes costly. The library crystallizes a common pattern used by agencies and product teams managing complex analytics requirements.

Growth

The project gained initial traction (2,658 stars by 2026) and has maintained slow but consistent activity. The recent 7-day star gain of 1 and last push on 2026-06-27 indicate ongoing maintenance rather than rapid expansion. Growth appears plateaued at a steady state, suggesting the project has found its addressable market and maintains it rather than pursuing explosive adoption.

In production

Adoption not verified in available metadata. No documented case studies, enterprise customers, or usage statistics provided. The presence of a live demo app and detailed documentation site (getanalytics.io) suggests genuine use, but quantitative adoption evidence is absent. npm download statistics referenced in README badge are not provided here.

Code analysis
Architecture

Based on README, the library implements a plugin-based architecture where analytics providers are loaded as plugins that respond to lifecycle hooks (page, track, identify, reset). Appears to support isomorphic JavaScript (browser and Node.js). The design prioritizes ease of adding/removing providers without code changes to calling code. TypeScript support is documented.

Tests

Not documented in README. No explicit mention of test suite, coverage percentages, or testing infrastructure.

Maintenance

Last push 2026-06-27 (9 days before evaluation date) indicates active maintenance. Project is 7+ years old (created 2018), suggesting stable, mature codebase. The modest rate of new stars (1 in 7 days) combined with recent commits suggests maintenance mode rather than rapid development — not stagnation, but deliberate steady-state.

Honest verdict

ADOPT IF: your team manages multiple analytics providers simultaneously, anticipates provider changes, or needs to enforce consistent tracking semantics across a codebase. The library's plugin model handles vendor switching elegantly. AVOID IF: you need extensive pre-built integrations with newer analytics platforms (adoption of plugins outside core providers not verified), require active community contribution, or need guaranteed commercial support. MONITOR IF: you are evaluating multi-provider analytics strategies; the project's stability and maintenance suggest it will remain a reliable option for the niche it occupies, though growth is unlikely to accelerate.

Independent dimensions

Mainstream potential

3/10

Technical importance

6/10

Adoption evidence

2/10

Risks
  • Adoption depth not verified: high star count may reflect theoretical interest rather than production deployment at scale.
  • Plugin ecosystem limited: the project appears to depend on either first-party plugins or community contributions. Breadth of third-party provider support not documented.
  • Slow growth trajectory: may indicate the abstraction pattern is not compelling enough for broad adoption, or the market addressed is inherently small.
  • Maintenance dependency: project relies on David Wells' continued stewardship; no evidence of active co-maintainers or organizational backing.
  • TypeScript support documented but implementation quality and completeness not verifiable from README alone.
Prediction

The project will likely persist in steady-state maintenance mode, serving teams with specific multi-provider requirements. Unlikely to achieve mainstream adoption or become the dominant abstraction layer in analytics. More probable outcome: remains a useful specialist tool for enterprises and agencies managing complex analytics stacks, with modest but stable user base.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

JavaScript
85%
HTML
13.2%
MDX
1%
Less
0.6%
Shell
0.1%
CSS
0.1%
Batchfile
0%

Information

Language
JavaScript
License
MIT
Last updated
2w ago
Created
94mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Recent releases

No releases published yet.

Similar repos

plausible

plausible/analytics

Plausible Analytics is a privacy-first, open-source web analytics platform...

27.6k Elixir Web Dev
Open-Web-Analytics

Open-Web-Analytics/Open-Web-Analytics

Open Web Analytics is a self-hosted, open-source web analytics platform that...

2.7k PHP Web Dev
electerious

electerious/Ackee

Ackee is a self-hosted, privacy-focused analytics platform built on Node.js and...

4.7k JavaScript Web Dev
Swetrix

Swetrix/swetrix

Swetrix is a privacy-first, open-source web analytics platform designed as a...

1.1k TypeScript Web Dev
googleanalytics

googleanalytics/ga-dev-tools

GA Demos & Tools is a showcase of demos and interactive tools built with Google...

1.5k TypeScript Dev Tools
vs. alternatives
Plausible Analytics

Plausible (27.5K stars) is a complete privacy-focused analytics service with its own backend; analytics.js is a client-side abstraction layer agnostic to the backend. Different problem domain: Plausible replaces Google Analytics; analytics.js coordinates among multiple providers.

Segment

Segment serves a similar abstraction role but operates as a hosted service with data warehouse capabilities. analytics.js is open-source, lightweight, library-only; Segment is enterprise platform. analytics.js likely appeals to teams avoiding vendor dependency for orchestration logic itself.

Open Web Analytics

OWA (2,674 stars) is a self-hosted analytics platform; analytics.js is a client SDK. Different layers of the stack: OWA is a destination; analytics.js routes events to destinations.

Swetrix

Swetrix (1,060 stars) is a privacy-focused analytics platform. analytics.js is infrastructure-agnostic; Swetrix is an opinionated service. Complementary rather than directly competitive.

Google Analytics DevTools

GA DevTools (1,535 stars) focuses on GA-specific debugging and development; analytics.js is multi-provider abstraction. Narrower scope vs. broader scope.