A Redux middleware that sends Mixpanel events from dispatched actions. Version 1.0.1 integrates with mixpanel-browser client library and intercepts actions with a `meta.mixpanel` property to track events and properties. No active maintenance, few downloads, and limited flexibility compared to more modern analytics middlewares like redux-beacon.
npm install redux-mixpanel-middlewareVerified import paths — ran on the pinned version, not inferred.
Initialize Mixpanel browser client, create middleware instance, apply to Redux store, and dispatch action with mixpanel meta to track event.
Ensure every action you want tracked includes `meta: { mixpanel: { event: 'EventName', props: {} } }`.Only use in browser or configure a mock mixpanel client for SSR.
Replace with redux-beacon or write a custom Redux middleware using mixpanel's track method directly.
Ensure mixpanel-browser is installed and imported: import mixpanel from 'mixpanel-browser';
Apply async middleware (e.g., redux-thunk) before MixpanelMiddleware in applyMiddleware.