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

agreeable-parrot-71961

02/06/2024, 8:17 AM
I am running a test with Attribute Targeting to US only. But under results, I can see that the test is being served to users from all countries. Please help!
s

salmon-dress-34772

02/06/2024, 10:22 AM
We have implementation in react and we call hook to show experiment
Copy code
const featureOn = useFeatureIsOn('featureId')

const activeVariation = useExperimentGrowth({key and variations})

if(featureOn ) {
experiment view
} else {
control
}
On UI its visible correctly and is shown only to users with featureOn, but
trackingCallback
is triggered even when feature is off Checked further and in logs found that callback is triggered at call of hook
useExperiment
and since its hook it has to be called at top level. Can you please help in this how to stop the callback when feature is off? Is there any parameter we need to pass to
useExperiment
to tell that feature is off
a

agreeable-parrot-71961

02/07/2024, 7:47 AM
@fresh-football-47124 Can you please help.
@brief-honey-45610 Awaiting support. Kindly assist.
s

salmon-dress-34772

02/09/2024, 6:44 AM
Got the reason and solution Thanks 🙂
6 Views