I'm currently implementing Google Analytics on my website using both the Google Universal Analytics and gtag extensions in Adobe Launch.
Consent management is handled through OneTrust, using the official extension, with the consent model set to opt-out by default. I’ve successfully configured custom code to ensure all Adobe-related cookies are only set after the user provides the appropriate consent.
However, I've encountered an issue where Google Analytics cookies (_ga, _gid, and _gat) are being dropped on page load, even when the user has not yet consented. From my investigation, it appears these cookies are automatically set by the Google Universal Analytics and gtag extensions, regardless of consent status.
Question:
Is there a recommended way to prevent these GA cookies from being set until the user has explicitly opted in — ideally while still using the Google Analytics and gtag extensions in Adobe Launch? Or does this require a more manual approach (e.g., loading GA scripts conditionally via custom code based on consent)?
Any best practices or implementation tips would be greatly appreciated!