supastarter for Nuxtsupastarter for NuxtAnalytics
Mixpanel
To use Mixpanel with supastarter, first create a Mixpanel account and get your app token.
Then, add the app token to your .env.local file and your deployment environment:
NUXT_PUBLIC_MIXPANEL_TOKEN=your_token_hereNext, we need to install the Mixpanel packages:
pnpm add --filter marketing mixpanel-browser
pnpm add --filter marketing -D @types/mixpanel-nodeFinally, we need activate Mixpanel as the analytics provider. To do this, open the apps/marketing/modules/analytics/index.ts file and set the provider path to "./provider/mixpanel".
To customize the Mixpanel configuration, edit the apps/marketing/modules/analytics/provider/mixpanel/index.ts.
Learn more about analytics with Mixpanel in the official documentation.
For further instructions, follow the general analytics instructions.