Hi everyone I have set a localstorage tracking tha...
# ask-questions
e
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
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
thank you !