This message was deleted.
# announcements
w
This message was deleted.
f
We use distinct_id when analyzing mixpanel results (which mixpanel generates and stores in a cookie), not the logged in user id. So as long as the mixpanel cookie is the same, we'll be able to tie together the initial trackingCallback event with the invoice payment event.
h
ah! that makes sense! so i can just use the mixpanel cookie instead of my two opposing ids?
f
yes. We have some sample Mixpanel code in our docs on how to pass the mixpanel cookie into GrowthBook https://docs.growthbook.io/app/datasources#mixpanel
Copy code
// Can only get the distinct_id after Mixpanel fully loads
mixpanel.init("YOUR PROJECT TOKEN", {
  loaded: function (mixpanel) {
    growthbook.setAttributes({
      ...growthbook.getAttributes(),
      id: mixpanel.get_distinct_id(),
    });
  },
});
🙏 1
h
thank you!
185 Views