Generate fake Mixpanel data quickly and easily with a simple CLI in Node.js. Create events, user profiles, groups profiles, SCD data, mirror tables, and lookup tables; basically everything you need for testing + demoing mixpanel analysis features.
the CLI looks like this:
under the hood, make-mp-data
is modeling data adherent to match Mixpanel's data model, giving you the tools you need for robust, realistical field ready test data.
Generate events and users, and write them to CSV files:
npx make-mp-data
Generate 10,000 events and 100 users over the last 90 days, and write the output as JSON:
npx make-mp-data --numUsers 100 --numEvents 10000 --numDays 90 --format json
Create a comprehensive dataset including events, users, groups, SCD, and lookup tables:
npx make-mp-data --complex
Generate and send data directly to Mixpanel using your project token:
npx make-mp-data --token 1234
Need more info on available options?
npx make-mp-data --help
To choose your own event and property names and values, specify a custom data model and additional options:
npx make-mp-data [dataModel.js] [options]
Example:
npx make-mp-data ecommSpec.js --token 1234 --numDays 30 --numUsers 1000 --numEvents 1000000
Check out ./models/
for example dataModel.js
files to get started quickly.
Here's a breakdown of the CLI options you can use with make-mp-data
:
-
--numUsers
: Number of users to generate. -
--numEvents
: Number of events to generate. -
--numDays
: Number of days over which to spread the generated data. -
--format
: Output format (csv
orjson
). -
--token
: Mixpanel project token for direct data import. -
--region
: Mixpanel data region (US
,EU
). -
--writeToDisk
: Whether to write the data to disk (true
orfalse
). -
--verbose
: Enable verbose logging. -
--complex
: create a complex set models including groups, SCD, and lookup tables. -
--simple
: create a simple dataset including events, and users
Check out the examples directory for sample data models:
ls ./models/
These models provide a great starting point for creating your own custom data generation scripts.
Feel free to fork this repository and submit pull requests. Contributions are always welcome!
For any issues or feature requests, please create an issue on the GitHub repository.