https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
v

victorious-library-28522

03/06/2023, 7:57 AM
Hi, I am using react SDK and I have set up the experiment and the GA connection. I am also able to get the feature value but it seems like the
trackingcallback
function is not being called. I am sending an event to GA and also using console.log in the
trackingcallback
. Is there something I can do ensure it runs smoothly ?
f

fresh-football-47124

03/06/2023, 8:16 AM
yes, one easy way to debug is to use the Chrome dev tool: https://chrome.google.com/webstore/detail/growthbook-devtools/opemhndcehfgipokneipaafbglcecjia Another would be to make sure that the experiment is being passed correctly to the SDK - look at the network tab and examine the feature payload.
n

numerous-ambulance-47156

03/10/2023, 2:24 PM
I do have the exact problem, it’s not triggering the
trackingCallback
for certain variation
b

better-magician-65629

03/21/2023, 9:58 PM
the tracking callback is only called if the user is in the experiment. it will not get called in the following cases: • a forced value is provided •
experiment.active
is not
true
• if there's no hash attribute to help evaluate the experiment (e.g. the custom-provided hash attribute or the fallback
id
on the user attributes) • if the conditions checked evaluate to false • if QA mode is true • the experiment has already been tracked, i.e. the tracking callback has already been called once for this experiment. (keeping track of tracked experiments is not supported in all SDK's currently) In the build-your-own section of the SDK docs, there's a section about implementing the experiment run and when the callback is fired. that should hopefully help clear up any confusion.
19 Views