@robinpath/mixpanel
v0.1.1
Published
> Mixpanel module for RobinPath.
Keywords
Readme
@robinpath/mixpanel
Mixpanel module for RobinPath.
Why use this module?
The mixpanel module lets you:
- trackEvent
- trackBatch
- identifyUser
- deleteUserProfile
- exportEvents
All functions are callable directly from RobinPath scripts with a simple, consistent API.
Installation
npm install @robinpath/mixpanelQuick Start
1. Set up credentials
mixpanel.setCredentials "your-credentials"2. trackEvent
mixpanel.trackEventAvailable Functions
| Function | Description |
|----------|-------------|
| mixpanel.setCredentials | Configure mixpanel credentials. |
| mixpanel.trackEvent | trackEvent |
| mixpanel.trackBatch | trackBatch |
| mixpanel.identifyUser | identifyUser |
| mixpanel.setUserProfile | setUserProfile |
| mixpanel.deleteUserProfile | deleteUserProfile |
| mixpanel.exportEvents | exportEvents |
| mixpanel.getTopEvents | getTopEvents |
| mixpanel.getEventStats | getEventStats |
| mixpanel.getFunnelReport | getFunnelReport |
| mixpanel.getRetention | getRetention |
| mixpanel.getSegmentation | getSegmentation |
| mixpanel.listCohorts | listCohorts |
| mixpanel.getInsights | getInsights |
| mixpanel.queryJql | queryJql |
Examples
trackEvent
mixpanel.trackEventtrackBatch
mixpanel.trackBatchidentifyUser
mixpanel.identifyUserIntegration with RobinPath
import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/mixpanel";
const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);
const result = await rp.executeScript(`
mixpanel.setCredentials "your-credentials"
mixpanel.trackEvent
`);Full API Reference
See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.
Related Modules
@robinpath/json— JSON module for complementary functionality
License
MIT
