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

echoing-advantage-79611

03/14/2024, 3:54 PM
Hi everyone I have set a localstorage tracking that monitors clicks on a CTA in our client's website. If the user has not clicked on a CTA, I set a growthbook attribute to false; if they click, the attribute will be true the next time. This is because I conduct an experiment only for those who have not clicked on the CTA in the previous 15 days (attribute set to false). In the experiment, I've set the attribute targeting to the value false, indeed users with false enter the experiment correctly. The problem is that once they have the value true, the same user exits the experiment and the feature flag is deactivated. How can I overcome this problem? A user who enters the experiment with false should remain even if their attribute changes state. can someone help me?
f

fresh-football-47124

03/15/2024, 3:59 AM
one way would be to use sticky bucketing
another would be to tie into your existing local storage - so in the trackingCallback, also track that they are enrolled, and then when checking the value of the flag- check the local storage first
e

echoing-advantage-79611

03/15/2024, 4:16 PM
thank you !
6 Views