Closed djiang closed 11 years ago
Sounds good -- I'm not really knowledgable on the mixpanel API but the logic here is consistent with the logic in the issue.
@pushred do you know of a way to test the distinct id logic? I haven't been following this work too closely so not really sure on the best way to confirm the existing bug has been fixed.
You mean in a unit test or manually?
We discovered this issue when looking at members who were logged in before they entered checkout to renew or upgrade a membership. The issue resulted in their new orders being attributed to a new distinct_id rather than their customer ID that we passed Mixpanel when originally creating their customer profile there.
So could use one of the Mixpanel development accounts to track on a test site manually. Just invited you & David to the site I setup for load testing, it's got all the widgets setup so you could just drop in this new version of sparkart.js and an API key for a fanclub with the dev account token.
Rebasing... then I'll drop in new version. It'll have to point to my machine for the latest version of sparkart-services
Should be all set up with my local machine. Production will be missing one endpoint, clear_distinct_id
. That is for explicitly clearing the mixpanel_distinct_id
from the session and consequently, disabling the call to Mixpanel.alias
I don't think you guys can properly test this as it is currently set up.
Yeah the code looks fine to me when I quickly took a look over. Sounds good re: it working on your machine. I figured it may be a bit difficult to set this up locally. If everything looks good on your end from testing it in that case I'd say it's probably safe.
Code looks good :thumbsup:
Branch: inlf0SKo-identify-mixpanel-users Issue: https://github.com/SparkartGroupInc/sparkart.js/issues/52