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 start
curl localhost:3000/api/koa/
- Check Mixpanel events
- Vercel and no Koa
npm start
curl localhost:3000/api/noKoa/
- Check Mixpanel events
- Koa and no Vercel
node index.js
curl localhost:3001/api/koa/
- Check Mixpanel events
All three now work with the provided configuration.