We are looking to understand how Growthbook links ...
# ask-questions
q
We are looking to understand how Growthbook links an user_id to an experiment phase ? Should we able to see this in GA4 under which Growthbook event? (The curent context is that we are looking to match Growthbook users part of an experiment's phase to our internal database for further data confirmation) and we need the phase information. How do we see it?
h
That is correct as long as you've setup the push in GTM. You'll see the "experiment_viewed" event in GA4 and Big Query (if you are using that). How are you randomizing the users? Are you using the ga cookie or something else? Edit: If for example a user gets a unique ID from your database when they visit your product, you could use that as an identificator. You'll need to add it to the datalayer though so that the value of that ID is included in the experiment_viewed event
q
We have that. The question is the "phase" in growthbook, re-read my questions again, the emphasize is on the "phase". How do we get for each user_id which phase he is in it?
h
Ah my bad! I know that the phase information is stored in local storage, so my best guess is that you can write a function in your app to get that value and then add it to the datalayer. If you go to your gbfeaturescache in local storage and navigate down you'll see the phase eventually.
q
do you happen to have any tutorial about steps needed to extract any custom value?
h
I do not unfortunately. I usually use ChatGPT which has been to a tremendous help. You could probably use the AI chat that GrowthBook has in their docs as well. I did a quick prompt in ChatGPT with your question and got this answer https://chatgpt.com/share/6745d38a-1570-8001-a35c-1ccc6975f29f The prompt could be much better though, but should give you an idea. Best of luck!
f
the user id is linked to an experiment by the exposure event and queried via the 'assignment query'
the experiment phases are essentially date limits on when to look at those exposure events