hi - is there any way to get what the variationId ...
# ask-questions
s
hi - is there any way to get what the variationId would be for a user for a given experiment without firing the tracking callback? altho it's rare, sometimes a user won't have seen an experiment until they take part in some kind of client action: for example - there is a button "Click Me!" which on click will show a pop-up. We would like to run an experiment on the contents of that pop-up. We don't want to allocate the user using the isOn method because that will attribute the user to having taken part in the experiment when there is no guarantee that they clicked the pop-up. However it is valuable to know what the pop-up content should be at the point of rendering the page (otherwise we need to go to the server to display the pop-up which sucks). ideally we'd be able to "peek" what the variationId would be on the server during the server-side render. The pop-up is then invisible but the html is according to the variant the user was assigned. if the user does indeed click on the pop-up, we can just callback to the server and register that the user did see this experiment. But this predicates on our being able to know what the variationId is without invoking the tracking callback. it's a bit of an edge case, but it does happen - any suggestions for this?
f
Hi Peter - we have a solution for pre-bucketing users, and that is activation metrics
so you can assign every user, and queue of the variation they would see
but fire an event for 'pop-up viewed' (or similar) - then in GrowthBook, you can add a metric for that event, and attach it to the experiment as an activation metric to filter out all those who were assigned, but never saw the experiment
thankyou 1
s
sounds perfect! thanks!