Hey GB community! Currently we with team facing is...
# ask-questions
n
Hey GB community! Currently we with team facing issues regarding Cookie Consent. I would like to hear your practice how are you dealing with it. We cannot load Client_ID or any other "Anonymous_ID" while user didn't choose cookie consent he accepts. Maybe there is work around how GB can gather "anonymous_ID" without consent? Also data should be tracked properly here.. (GA4). Otherwise we can test only with users that accepted cookies (50-65% of users) and show modified page version only after he refresh page or visit it second time.. Any best practices here? Thank you!
f
Use first party cookies
f
You can create your own first party cookie - we have some examples on how to do this
n
@fresh-football-47124 , but we use data from GA4 so we still need to pass that First party cookie to GA4 to get data for variations? Or no?
j
Hi @narrow-ice-32878, you are right. While processing GA4 data in GDPR zone, you can't use unconsented data for Growthbook. If you are using consent mode in GTM (or hardcoded gtag() function) data is sent into BQ but user id is anonymized and GB can not use this data for calculation.. I guess. At least I noticed that our data accumulation in GB dropped after implementation of consent mode v2. We have actually 2 GA4 accounts and I am thinking that to move that second GA4 account that we have strictly only for GB to server-side tagging, where we will force granted consent. Not 100% sure that this is legal in eurozone. Also i am not sure if it would help to use in place of user_id some other identification that would be stable in BQ and not anonymized?
n
Overall what i came if you use GA4, there is no legal way to track all the data on website. The way we are considering (that is also not fully legal) either go through server-side as you mentioned (less visible to the world) either make GA statistical cookies under the essential section. (Only statistical, that will collect anonymized data on page views, behavioural metrics & events).
At least there will be no PII data and also no info collected for audiences, segments and other Marketing activities, that takes biggest part in compliance regulation.
f
it is an interesting question, because if you use GA4's clientId for feature flags, it start becoming an essential cookie. You can also use any id, even a self-generated id, for assignment. if that is saved to a cookie, and it will be anonymous. On the trackingCallback side, you can still use the GA4 and whatever opt-in preferences they have - if they have opted out, then the trackingCallback won't log that event.