Hi Guys, I am tracking the exposure event inside t...
# ask-questions
b
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
You do need a userId in the data warehouse- but most trackers will append this info automatically
that looks like segment?
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)