Is there any way to track only users who were expo...
# ask-questions
b
Is there any way to track only users who were exposed to an experiment? Instead of tracking all the users. We want to run a test on the PDP and we want to track users who landed on the PDP and saw either the control or the treatment. We don’t want to track users who visited other parts of the site and never visited the PDP.
h
We only fire the trackingCallback for experiment exposure events; if they're firing everywhere that would probably be an implementation issue.
b
How can I make it fire only by making an experiment fire based on URL from the dashboard?
h
Are you talking about a visual experiment made with the visual editor? Or an AB experiment linked with a feature flag?
b
AB test linked with a feature flag
h
there are a few ways to do this: • If you have configured a
url
-type attribute and made that available to your SDK, then you can write attribute targeting conditions on that URL using regex within the GrowthBook app • Or (probably easier), do a URL check in your codebase so that you only check the feature flag's state if on the correct URL