This was a minimal example of Mixpanel not working properly with Vercel and Koa, but this repo has led us to a solution! :)
There are three situations you can test:
- Koa + Vercel
npm startcurl localhost:3000/api/koa/- Check Mixpanel events
- Vercel and no Koa
npm startcurl localhost:3000/api/noKoa/- Check Mixpanel events
- Koa and no Vercel
node index.jscurl localhost:3001/api/koa/- Check Mixpanel events
All three now work with the provided configuration.