Hi Guys, I am tracking the exposure event inside the
trackingCallback
, and here is the code:
trackingCallback: (experiment, result) => {
trackEvent('experiment_viewed', {
experimentId: experiment.key,
variationId: result.key
});
}
My question is: do I need to include the
userId
in this event? If not, how would GrowthBook know which user is exposed to which experiment and variation?
Additionally, for other custom events, should I also send the
experimentId
,
variationId
, and
userId
with those events?
f
fresh-football-47124
09/19/2024, 6:38 AM
You do need a userId in the data warehouse- but most trackers will append this info automatically
fresh-football-47124
09/19/2024, 6:38 AM
that looks like segment?
fresh-football-47124
09/19/2024, 6:39 AM
For any other events, all you need is a user identifier, we will join back to the exposure event to get which experiment they were part of (if any)