- Issue created by @francismak
- π¨πSwitzerland zilloww
Hello, any new on this update? Just tried the patch but unfortunately, it is not working for me. (See Gtag preview mode screenshot linked below)
I tried it on `2.0.6`. When I try it on `^2.0-dev@dev`, the patch isn't applied.
While waiting for an answer, I'll try some tweaks to see if I can do something for this issue that is becoming a little critical because of the new Google consent restrictions deadline...
- πΊπΈUnited States philltran Detroit, MI
@zilloww Looks like this patch was committed via issue 3180185 β¨ Support Google Analytics consent mode Fixed
- πΊπΈUnited States philltran Detroit, MI
@zilloww Opps. My mistake. This patch moves the
if (config.consentMode === true) { gtag('consent', 'default', { ad_storage: 'denied', analytics_storage: 'denied', ad_user_data: 'denied', ad_personalization: 'denied', wait_for_update: 500, }); }
code block from `/js/gtag.js` to `/js/gtm.js`
- πΊπΈUnited States philltran Detroit, MI
I updated the patch to work on 2.0.x dev branch. I added a condition on gtag implementation of default consent to only apply if `gtm` is empty. Otherwise we would have consent.default set twice. I tested this successfully with GTM-xxx and AW-xxx ids. Using a G-xxx id made the consent.default load too late. I will continue to look into that issue and am open to anyone else's insight on the matter.