mixpanel/mixpanel-js
mixpanel/mixpanel-js has 942 GitHub stars and 340 forks. GitHot measured 0 in 7 days and -1 in 15 days. Last checked 2026-11-09 13:39 UTC. Last push 2026-10-06.
Official Mixpanel JavaScript Client Library
측정된 스타 증가
- in 24h
- 업데이트 지연
- in 7 days
- 0
- in 15 days
- -1
- in 1 month
- 업데이트 지연
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalMixpanel JavaScript Library
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
npm run build-dist also writes dist/mixpanel-browser.cdx.json, a CycloneDX Software Bill of
Materials (SBOM) covering the production dependency tree, so it ships with the published package.
To regenerate just that file: npm run sbom.
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 documentation
- Generate Markdown with typedoc from the JSDoc in
src/and the types insrc/index.d.ts:npm run build-docs(result is atdoc/readme.io/javascript-full-api-reference.md, configuration indoc/typedoc.json) - The docs are also regenerated as part of
npm run build-dist
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, @pkuczynski, @sarmah-rup
관련 프로젝트 살펴보기
Asabeneh/30-Days-Of-Python
30 Days of Python 프로그래밍 챌린지는 Python 프로그래밍 언어를 30일 동안 배우기 위한 단계별 가이드입니다. 이 챌린지는 100일 이상 걸릴 수 있습니다. 자신의 속도에 맞춰 진행하세요. 다음 동영상도 도움이 될 수 있습니다: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,486 스타grafana/grafana
개방적이고 조합 가능한 옵저버빌리티 및 데이터 시각화 플랫폼입니다. Prometheus, Loki, Elasticsearch, InfluxDB, Postgres 등 여러 소스의 메트릭, 로그, 트레이스를 시각화합니다.
77,790 스타redis/redis
실시간 데이터 기반 애플리케이션을 구축하는 개발자에게 Redis는 가장 선호되고, 가장 빠르며, 기능이 가장 풍부한 캐시, 데이터 구조 서버이자 문서 및 벡터 쿼리 엔진입니다.
77,332 스타apache/superset
Apache Superset는 데이터 시각화 및 데이터 탐색 플랫폼입니다.
75,455 스타