Has anyone here managed to implement cookiebot to ...
# ask-questions
h
Has anyone here managed to implement cookiebot to work with growthbook implemented with the react sdk? Been spending today and yesterday trying to get it to work, but no luck. We hash the user based on the _ga cookie so the gbFeaturesCache need to load in after consent has been given
Managed to solve this. If you are reading this in the posterior and have the same issue, feel free to DM me here on Slack 🙂
f
Hi Nicolaus - the cookiebot prevents cookies from being set before the user opts in?
surely you could download the features anyway, but just not do assignment until the user opts in? Not setting user attributes would probably accomplish this very simply
h
Hey Graham, Exactly, cookiebot prevents the _ga cookie to be set if consent is not given. The issue was that if I landed on the page and an experiment was running I was re-randomized as soon as I consented since the hasing we have is on the _ga cookie. What i've done now is that GrowthBook is not initialized at all until consent is given. I'm doing this by using an event listener from cookiebot. There has always been an discussion regarding if you should still show the variation without consent, but just not track the user, but we have decided that the safest approach for us is to just not show anything at all related to growthbook until a user has given consent. EDIT: I did notice now though that stopping the gbFeaturesCache also prevents features not part of an experiment to load, so will have to continue investigating regarding that.