Mixpanel is a platform that provides simple product analytics across Just About, it's currently in use in next-app, strapi & discord.
Mixpanel provides developers with the ability to send arbitrary events to Mixpanel for any user action / event that occurs, which can then be tracked & viewed via the Mixpanel dashboard by product people.
For example, collecting insights into how many people click a button can be done like the following:
EventTypes enum https://github.com/Just-about/just-about/blob/167945845174d5f202a78aa65b41b2f24de7d096/apps/next-app/app/_utils/events.ts#L22-L22enum EventTypes {
CLICKED_BUTTON = "User clicked a button", // Used when the user clicks this button
// ...
}
Track object which can be used in the rest of the app https://github.com/Just-about/just-about/blob/167945845174d5f202a78aa65b41b2f24de7d096/apps/next-app/app/_utils/events.ts#L94-L94Track = {
clickedButton: () => trackEvent(EventTypes.CLICKED_BUTTON, undefined, {}),
}
<JAButton onClick={Track.clickedButton} label="Click me!" />
