finds.dev← search

// the find

mixpanel/mixpanel-js

★ 939 · JavaScript · Apache-2.0 · updated Jul 2026

Official Mixpanel JavaScript Client Library

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.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →