laravel-mixpanel
laravel-mixpanel copied to clipboard
Changes for ID Merge
Mixpanel released an update on managing distinct IDs that is opt-in. It looks like, for the most part, there are no issues with updating. With 1 exception:
https://help.mixpanel.com/hc/en-us/articles/360039133851#benefits-of-the-new-system
You can no longer control the canonical id for users in Mixpanel
It looks like laravel-mixpanel assigns the user ID as the canonical ID for the user. To make sure our User IDs don't get wiped on the new system I propose that the package sends 'Laravel ID' or 'Database ID' as a property to Mixpanel so we can trace the profiles in Mixpanel back to their Laravel counterparts.
@aakarim That's a good idea. Would you be able to submit a PR?
Sure.
Any suggestions on how to deal with backfilling data?
My proposal is an artisan command: mixpanel:backfill:user-id
which submits an update to each user's Mixpanel profile.
That also sounds interesting ... but should be a separate PR. Thanks!
Hello! Mixpanel's new ID merge function allows you to merge pre authentication and after authentication events (even if they have different distinct id) with your package I guess it works fine with that, doesn't it? How does your package handle identity because I saw that once the user is authenticated it uses user_id, what id does it assign to pre-authentication events?
on the other hand, if I need to integrate the JS mixpanel library because there are events that make it easier for my project to handle it with that, how do you suggest handling the identity in conjunction with your package?
Hello @mikebronner @aakarim I did the test of the question I asked and I see that it does not work well, I place a track "home SaludVitale" with js following your steps https://github.com/GeneaLabs/laravel-mixpanel#javascript-events--auto-track in the home page and it comes out fine perfect in live view
then as you see there I login (there I understand it works with php with the default event of the package) but within the explore the event that I did before login "home SaludVitale" doesn't associate it with the user...only show Login event
why? I have the ID merge enable in my project