hi @fresh-football-47124 thanks for the prompt response
> The randomization function uses only the experiment key and the user attribute you've selected.
>
the first question is more toward, how would GB ensure the intended split toward the treatment groups within each environment (independent from the event firing)
Lets just assume the following (exaggerating example):
• there are 1000 user identifiers in dev environment and 30 user identifiers in production environment. And they are completely unique from each others
• there are 2 groups in total (1 control 1 treatment) for dev env
• there are 3 groups in total (1 control 2 treatment) for prod env
How GB ensure the production version will have close to 10 users for each group knowing the randomization will account all 1030 unique user identifiers from all environment instead of randomizing it for each environment
on 2nd thought, i think it will still randomize accurately per environment because each environment will have different rules, setup, and treatment
> You are welcome to pass any environment to the trackingCallback so it can be used in the SQL to segment traffic.
>
how to pass/add environment information to the trackingCallback? isnt that something GB handles and pass to client, out of the box?
Assuming environment can be passed into trackingCallback. how can it be used in the SQL to segment traffic?
Understood that most other implementation does not necessarily fire event tracking in non production environment. But in the case it does like ours, how would you suggest us to setup the A/B Test, Assignment Query and Metric? This is what i have in mind, but happy to take feedbacks
1. Fire experiment exposure event and attach environment context
2. Fire intended/measured event and attach environment context
3. Given we intended to measure metric for production environment only, then set up Assignment SQL Query for the intended identifier and include prod event only
4. Setup Metric queries. From your explanation above, it does not seem like we need to point Metric query to production env given that should have been taken care and filtered out by Assignment Query done in step no 3
Assuming they are all valid, we may not need to do step no 2 also as long as the environment context is attached to experiment exposure event.