← Back to Docs
Recipe

Mixpanel Setup

Drop-in analytics for your Nimbus dashboard in under 5 minutes.

1. Get your token

Create a project at mixpanel.com, then copy the project token from Settings → Project Token.

2. Install the SDK

npm install mixpanel-browser

3. Initialize

import mixpanel from 'mixpanel-browser'

mixpanel.init('YOUR_PROJECT_TOKEN', {
  debug: process.env.NODE_ENV !== 'production',
  track_pageview: true,
  persistence: 'localStorage',
})

4. Track events

mixpanel.track('License Activated', {
  plan: 'pro',
  source: 'dashboard',
})

Fire events on key actions — license activation, feature toggles, checkout completions.

5. Identify users

mixpanel.identify(user.id)
mixpanel.people.set({
  $email: user.email,
  $name: user.name,
  plan: user.plan,
})

Pro tip: Wrap Mixpanel calls in a utility so you can swap providers later without touching every component.