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

better-van-99607

02/01/2024, 2:29 PM
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

happy-autumn-40938

02/01/2024, 9:48 PM
We only fire the trackingCallback for experiment exposure events; if they're firing everywhere that would probably be an implementation issue.
b

better-van-99607

02/02/2024, 8:02 AM
How can I make it fire only by making an experiment fire based on URL from the dashboard?
h

happy-autumn-40938

02/02/2024, 5:29 PM
Are you talking about a visual experiment made with the visual editor? Or an AB experiment linked with a feature flag?
b

better-van-99607

02/02/2024, 5:51 PM
AB test linked with a feature flag
h

happy-autumn-40938

02/02/2024, 5:55 PM
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
4 Views