Hi,
I’m still testing GB and now I’ve come across the following: I need to get variation_id before the trackingCallback is executed, is there a way to do this with the react SKD?
f
fresh-football-47124
02/24/2023, 4:24 PM
Interesting - yes, it’s possible… not sure you should do it…
fresh-football-47124
02/24/2023, 4:25 PM
can you explain more about the use case?
b
brainy-honey-94290
02/24/2023, 4:37 PM
Hi @fresh-football-47124, I’m trying to show a variant before executing the callback, since I need to save the result based on an action after the user sees the experiment, I see in devtools that it shows that it shows the assigned variant, but I can’t find the way to access it with the react sdk
f
fresh-football-47124
02/24/2023, 4:56 PM
could you just save it from the tracking callback?
fresh-football-47124
02/24/2023, 4:57 PM
you can put whatever you like in that
fresh-football-47124
02/24/2023, 4:58 PM
you can also use
gb.evalFeature("my-feature");
to get more details about what was chosen for the user
b
brainy-honey-94290
02/24/2023, 5:06 PM
Copy code
could you just save it from the tracking callback?
yes, It is an option that I am evaluating, but I wanted to see if there is any other way to get it before the callback is fired
Copy code
you can also use gb.evalFeature("my-feature"); to get more details about what was chosen for the user