swift-belgium-56757
12/01/2023, 12:00 PMExtra UserId property
(Mixpanel data source integration) works.
I have two questions. Let me ask them with examples:
1. Example 1
▪︎ A user opens website first time and Mixpanel assigns distinct_id
‘abc123’.
▪︎ Then this user makes a purchase and and we call mixpanel.identify() with our internal user_id
‘789’.
▪︎ Also we save user_id
‘789’ as a super property in Mixpanel
◦ Question 1 How many users are identified with GrowthBook Extra UserId Property
= user_id
?
◦ Question 2 How many users are identified without Extra UserId Property
set in GrowthBook?
2. Example 2:
▪︎ A user opens website first time and Mixpanel assigns distinct_id
‘abc123’. We also assign GB_id
= ‘zyz987’ and save it as a Mixpanel super-property
▪︎ After a certain moment Mixpanel distinct_id
changes, but GB_id
remains the same
◦ Question 1 How many users are identified with GrowthBook Extra UserId Property
= GB_id
?
◦ Question 2 How many users are identified without Extra UserId Property
set in GrowthBook?
Thank you in advance!rhythmic-agent-34208
12/01/2023, 12:00 PMswift-belgium-56757
12/05/2023, 11:28 AMbillions-xylophone-11752
12/05/2023, 12:05 PMbillions-xylophone-11752
12/05/2023, 1:25 PMdistinct_id
. If an extra userId property is set, it's an additional group by. So if either the distinct_id OR the extra user id property changes, it will count as a new user in the analysis.
So in both of the examples, adding an extra user property increases the number of users in the experiment.
The reason we added this option is because some companies set the exact same distinct_id for every single user to get around Mixpanel limits, so they need to use a custom super property to uniquely identify people instead.swift-belgium-56757
12/05/2023, 1:34 PMswift-belgium-56757
12/05/2023, 1:36 PMbillions-xylophone-11752
12/05/2023, 2:48 PMdistinctId
changes whenever a user registers? In that case, even if you were to create your own ID that persisted before and after registration and set it to the extraUserId
property, it would result in two users, since we'd add the additional GROUPBY
clause.
If the distinctId
is changing after registration, we don't support that use case with our Mixpanel data source. We recommend switching to a SQL data warehouse instead for more flexibility for how to handle different IDs.swift-belgium-56757
12/05/2023, 6:02 PMTo confirm, in your setup, theYes - a new distinct id is assigned after registration / loginchanges whenever a user registers?distinctId
In that case, even if you were to create your own ID that persisted before and after registration and set it to theproperty, it would result in two users, since we’d add the additionalextraUserId
clause.GROUPBY
If theThanks for the recommendation. Giving Mixpanel one last chance, do you think this setup will work correctly? • Our ID (the same for a user - before and after registration) will be used only for GrowthBook, which means that Mixpanel unique ID will not be used for traffic distribution. • Nois changing after registration, we don’t support that use case with our Mixpanel data source. We recommend switching to a SQL data warehouse instead for more flexibility for how to handle different IDs.distinctId
extraUserId
in the GB / Mixpanel integration.
• Experiment started
Mixpanel event will be sent based on what version is assigned by GrowthBook.
• Mixpanel will only be used for reporting with it’s own identity management mechanism.billions-xylophone-11752
12/05/2023, 6:38 PMmixpanel.track("$experiment_started", {
"Experiment name": experiment.key,
"Variant name": result.variationId,
$source: "growthbook",
});
I'm not sure familiar with Mixpanel's track method - is there a way to override the distinct_id
? From what I can tell, that distinct_id
is automatically included in the mixpanel.track
call.
If you were to pass in your ID when instantiating Growthbook (e.g.)
// Add the mixpanel user id to the GrowthBook attributes when it loads:
mixpanel.init("[YOUR PROJECT TOKEN]", {
debug: true,
loaded: function (mx) {
growthbook.setAttributes({
...growthbook.getAttributes(),
id: <YOUR ID>, //instead of mx.get_distinct_id(),
});
},
});
Then when it came time to analyze the experiment, the ids
wouldn't match up, unless you were able to override the distinct_id
when calling mixpanel.track()
.swift-belgium-56757
12/06/2023, 12:37 PM