Sourcemap Explorer
Stack · npm package

mixpanel-browser

The official Mixpanel JavaScript browser client library

latest 2.81.0· Apache-2.0· 102 versions publishedView on npm

About

The official Mixpanel JavaScript browser client library

What detecting mixpanel-browser tells you about a site

mixpanel-browser is the browser SDK for Mixpanel, a long-established product-analytics platform focused on event tracking, funnels, retention and cohort analysis. Finding it tells you the team measures specific user actions deliberately, since Mixpanel's model rewards intentional event design rather than passive page-view tracking. Its presence often indicates a product organisation with dedicated analytics or growth practice, because Mixpanel is typically chosen by teams that build event taxonomies and study behaviour cohorts. It signals a data-informed culture where what users do inside the app is tracked at the action level, not just at the page level.

Why the exact mixpanel-browser version matters

The Mixpanel browser SDK has shifted its defaults over major versions, notably around autocapture, EU data residency options and how it batches and persists events. The exact version tells you which tracking defaults and data-routing options are in play, which matters for understanding both data volume and where that data physically lands.

mixpanel-browser in a real-world stack

When you find mixpanel-browser in a bundle, it rarely travels alone. Sometimes alongside a separate session-replay or A/B tool, since Mixpanel focuses narrowly on event analytics.

Quick facts

Latest version2.81.0
LicenseApache-2.0
Installnpm install mixpanel-browser
Direct dependencies5

What mixpanel-browser pulls in

mixpanel-browser declares 5 direct dependencies — each one also rides into any bundle that ships mixpanel-browser, so they are detection targets too. Reading them is a quick way to understand the package's real footprint .

json-logic-js@mixpanel/rrweb@types/json-logic-js@mixpanel/rrweb-utils@mixpanel/rrweb-plugin-console-record

How Sourcemap Explorer detects mixpanel-browser

mixpanel-browser ships as v2.81.0, published 2026-07-09 and carries 5 direct dependencies, 102 versions on the registry. Those exact numbers are the footprint Sourcemap Explorer matches when mixpanel-browser rides inside a deployed bundle — here is how the detection works.

We catch mixpanel-browser from two complementary signals: bundled source paths and the embedded package.json. Modern bundlers (webpack, Vite, esbuild, Rollup, Turbopack) preserve the original node_modules/mixpanel-browser/ paths inside the JavaScript sourcemap's sources[] array — that's the canonical signal. When the matching package.json is also captured in sourcesContent[], we read the exact version field — patch number included. No regex guessing, no version inference.

  1. 1

    Confirm the site exposes sourcemaps

    In DevTools Network, check the response headers of any application script for `SourceMap` or `X-SourceMap`. Failing that, fetch the script's last 4 KB and look for a `//# sourceMappingURL=` comment — that map is where the `mixpanel-browser` paths live.

  2. 2

    Find the package in the bundle

    Open DevTools → Network → reload. Click any application script and look at its sourcemap. Inside, search `sources[]` for entries matching `node_modules/mixpanel-browser/` — every match confirms the package is bundled. The matching `sourcesContent[i]` for `node_modules/mixpanel-browser/package.json` gives you the exact installed version.

  3. 3

    Read the version directly from package.json

    Run `jq -r '. as $m | $m.sources | to_entries[] | select(.value | endswith("node_modules/mixpanel-browser/package.json")) | $m.sourcesContent[.key] | fromjson | .version' bundle.js.map`. Sourcemap Explorer automates the same query in the popup.

Recent versions

Version
Released
2.81.0
2026-07-09
2.80.0
2026-05-28
2.79.0
2026-05-14
2.78.0
2026-04-08
2.77.0
2026-03-25
2.76.0
2026-03-18
2.75.0
2026-02-25
2.74.0
2026-01-27

mixpanel-browser README

Live mirror of the GitHub README, for reference. Updated whenever the repo's default branch changes.

Mixpanel JavaScript Library

Build Status

The Mixpanel JavaScript Library is a set of methods attached to a global mixpanel object intended to be used by websites wishing to send data to Mixpanel projects. A full reference is available here.

Alternative installation via NPM

This library is available as a package on NPM (named mixpanel-browser to distinguish it from Mixpanel's server-side Node.js library, available on NPM as mixpanel). To install into a project using NPM with a front-end packager such as Vite or Webpack:

npm install --save mixpanel-browser

You can then import the lib:

import mixpanel from 'mixpanel-browser';

mixpanel.init("YOUR_TOKEN", {autocapture: true});
mixpanel.track("An event");

NOTE: the default mixpanel-browser bundle includes a bundled mixpanel-recorder SDK. We provide the following options to exclude mixpanel-recorder if you do not intend to use session replay or want to reduce bundle size:

To load the core SDK with no option of session recording:

import mixpanel from 'mixpanel-browser/src/loaders/loader-module-core';

To load the core SDK and optionally load session recording and targeting bundles asynchronously (via script tag):

import mixpanel from 'mixpanel-browser/src/loaders/loader-module-with-async-modules';

Use as a browser JavaScript module

If you are leveraging browser JavaScript modules, you can use importmap to pull in this library.

<script type="importmap">
{
  "imports": {
    "mixpanel-browser": "https://cdn.mxpnl.com/libs/mixpanel-js/dist/mixpanel.module.js"
  }
}
</script>
<script type="module" src="main.js"></script>

Then you are free to import mixpanel-browser in your javascript modules.

// main.js
import mixpanel from 'mixpanel-browser';

mixpanel.init('YOUR_TOKEN', {autocapture: true, debug: true, persistence: 'localStorage'});

Building bundles for release

  • Install development dependencies: npm install
  • Build: npm run build-dist

Running tests

  • Install development dependencies: npm install
  • Run unit tests: npm test
  • Start test server for browser tests: npm run integration_test
  • Browse to http://localhost:3001/tests/ and choose a scenario to run

In the future we plan to automate the last step with a headless browser to streamline development (although Mixpanel production releases are tested against a large matrix of browsers and operating systems).

Generating and publishing documentation

  • Create bundled source build: npm run build-dist
  • Generate Markdown: npm run dox (result is at doc/readme.io/javascript-full-api-reference.md)
  • Publish to readme.io via the rdme util: RDME_API_KEY=<API_KEY> RDME_DOC_VERSION=<version> npm run dox-publish

Thanks

For patches and support: @bohanyang, @dehau, @drubin, @D1plo1d, @feychenie, @mogstad, @pfhayes, @sandorfr, @stefansedich, @gfx, @pkaminski, @austince, @danielbaker, @mkdai, @wolever, @dpraul, @chriszamierowski, @JoaoGomesTW, @@aliyalcinkaya, @chrisdeely, @dylan-asos, @chrisknu

FAQ

What is mixpanel-browser used for?

The official Mixpanel JavaScript browser client library

How can I tell if a website is using mixpanel-browser?

Open the page in Chrome with the Sourcemap Explorer extension installed and read the Stack tab. We catch `mixpanel-browser` from two complementary signals: `node_modules/mixpanel-browser/` paths inside the JavaScript sourcemap, and the embedded `package.json` we read for exact-version detection. Without the extension you can do the same lookup manually in DevTools — the steps are listed in the "How Sourcemap Explorer detects" section above.

How do I find out which version of mixpanel-browser a website is running?

Read it straight from the site's JavaScript sourcemap. When a build ships source maps, the bundled `mixpanel-browser/package.json` carries the exact `version` string — Sourcemap Explorer extracts it in one click on the Stack tab, and you can do it by hand in DevTools by opening the `.map` file and searching for `node_modules/mixpanel-browser/package.json`. That is far more reliable than inferring the version from an asset-hash or a `?ver=` query string, which is all surface-level detectors have to go on. The current npm release is 2.81.0, but real deployments frequently run an older pinned version — which is exactly why reading the bundled number matters.

What is the latest version of mixpanel-browser?

2.81.0, as published on the npm registry. The "Recent versions" table on this page lists the most recent 8 releases with their release dates. Sourcemap Explorer reports the version actually bundled into a site, which can lag the latest release by months on real-world deployments.

Is mixpanel-browser actively maintained?

Very actively maintained — the last release shipped within the past three months. The last published release was 2026-07-09. Source code: https://github.com/mixpanel/mixpanel-js.

Where can I read more?

Project homepage: https://github.com/mixpanel/mixpanel-js. Source code: https://github.com/mixpanel/mixpanel-js. Published on npm: https://www.npmjs.com/package/mixpanel-browser. Licensed as Apache-2.0.

Detected by Sourcemap Explorer

When a bundle ships sourcemaps, we read the embedded package.json for mixpanel-browser and report the precise version (the registry's latest is v2.81.0, published 2026-07-09; the bundled copy is often older). Without sourcemaps, an import / require in the page's scripts is enough to flag it.

Install free on Chrome