finds.dev

mixpanel/mixpanel-js

Official Mixpanel JavaScript Client Library

View on GitHubHomepage ↗

★ 939JavaScriptApache-2.0updated Jul 2026

// the take

The official Mixpanel JS client for browser-side analytics — event tracking, user identity, persistence, session replay, and feature flags. This is the library you drop in when you're paying for Mixpanel and need first-party data collection. Not a standalone analytics solution; it's a vendor SDK.

The bundle fragmentation is actually well-thought-out: you can import core-only, async-load the recorder separately, or take the full bundle, which lets you avoid shipping rrweb to users who don't need session replay. The GDPR utilities are a real feature, not an afterthought — opt-out persistence, cookie clearing, and consent gating are all built in. The shared-lock mechanism across tabs (shared-lock.js) means you don't get duplicate flushes when the user has multiple tabs open, which most analytics SDKs handle badly. OpenFeature provider in packages/ means you can use Mixpanel flags behind a vendor-neutral interface and swap it out later.

Dist files are committed to the repo, which is a red flag for a project at this scale — reviewing changes becomes harder and the diff noise is real. The integration tests still require a human to open a browser and navigate to localhost:3001 manually; the README explicitly says they plan to automate this 'in the future', which has probably been written there for years. TypeScript types live in a single index.d.ts at the src root and are clearly hand-maintained rather than generated, so they lag behind the JS implementation. No way to run this fully offline or against a local sink — every event goes to Mixpanel's ingestion endpoint, which makes testing in CI annoying without network mocking.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
939
Forks
332
Language
JavaScript
License
Apache-2.0
Last commit
10 Jul 2026

// nearby

If mixpanel-js isn't quite it.

All repos →