{"repo":"mixpanel/mixpanel-js","free":true,"listed":false,"github":"https://github.com/mixpanel/mixpanel-js","clone":"git clone https://github.com/mixpanel/mixpanel-js.git","description":"Official Mixpanel JavaScript Client Library","language":"JavaScript","stars":942,"topics":["javascript","mixpanel","mixpanel-javascript-library","analytics","browser","sdk"],"license":"Apache-2.0","category":"api-integrations-sdks","readme_excerpt":"Mixpanel 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: You can then import the lib: 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: To load the core SDK and optionally load session recording and targeting bundles asynchronously (via script tag): Use as a browser JavaScript module If you are leveraging browser JavaScript modules, you can use importmap to pull in this library. Then you are free to import mixpanel-browser in your javascript modules. 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","default_branch":null,"files":null,"tree":[],"storefront":"/r/mixpanel","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mixpanel/mixpanel-js/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}