Hello! Could you please help me to better understa...
# ask-questions
s
Hello! Could you please help me to better understand how the
Extra 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!
r
Our official support hours are 6:30am - 5pm Pacific Time, Monday through Friday. You may occasionally hear from us outside of these hours. Your support request has been logged in our system. Our support team will get back to you very soon!
s
Would someone be kind enough to assist with this matter, please?
b
Hey, Dmitry - absolutely. I'm not super familiar with the Mixpanel integration - let me sync with the team to get an answer for you on this.
🙏 1
Hey Dmitry - I got some context from the team. We always group users by
distinct_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.
s
Thank you Michael! It’s interesting… Are there any suggestions on how to set up Growthbook experiments for unregistered customers with the KPIs that happen after registration. For example, CR First page visit -> Purchase (after registration). It means that at the moment of registration Mixpanel distinct id changes and GrowthBook library set up a new version to a user (if we pass Mixpanel distinct id to GrowthBook).
Do we need to create our own ID that It must be the same before and after registration?
b
@swift-belgium-56757 To confirm, in your setup, the
distinctId
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.
s
To confirm, in your setup, the
distinctId
changes whenever a user registers?
Yes - a new distinct id is assigned after registration / login
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.
Thanks 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. • No
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.
b
@swift-belgium-56757 I'm not 100% sure. When you're tracking experiment assignments, are you calling:
Copy code
mixpanel.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.)
Copy code
// 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()
.
s
Thank you @billions-xylophone-11752!