bland-sugar-5920
02/15/2023, 5:39 PM$experiment_started
events in mixpanel never show up.
I have verified that trackingCallback
in the middleware is being fired so I'm not clear as to
what's happening.
At some point I thought that maybe the middleware was completing before the call to mixpanel
could actually fire so I wrapped the mixpanel.track
into a promise that resolves itself in a
callback passed to mixpanel.track
and then added NextFetchEvent#waitUntil
on the promise in
question. This should have ensured that the middleware waits on the promise to resolve before
moving on but unfortunately this had no discernible effect. I removed this extra complexity sometime
yesterday prior to writing this message so it's not reflected in the pastebin example.
At this point I'm not sure what else to try other than maybe plug in some other library for tracking.
This is my first time using both Growthbook and Vercel middleware so it's totally possible that I'm
doing something naïve. I hope that's really the case!
For context I've included the contents of the middleware in question below. lib/growthbook/features.json
is populated at server start and as part of the build process.
https://paste.laravel.io/4d138b7e-7f96-4ce2-b074-d837ae2d9900