-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Add Mixpanel as a supported analytics backend.
Implementation
Use direct HTTP API via fetch (like segment and posthog backends do).
Why not use a library:
mixpanel-browser- client-side only, requires DOMmixpanel(Node.js SDK) - uses nativehttp/httpsmodules. Won't work on Vercel Edge Runtime.
API endpoint: https://api.mixpanel.com/track (or /import for historical data)
Config
mixpanelBackend({
token: process.env.MIXPANEL_TOKEN!,
// optional: use EU data residency
host?: "https://api-eu.mixpanel.com"
})Event mapping
pageView->Page Viewedevent- custom events -> pass through as-is
anonymousUserId->$device_iduserContext.userId->$user_id
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request