Hiya,
I have found a minor bug in the Cookie Consent popup and settings:
version 4.8.6.3 and previous versions.
When you add the current G-XXXXXXXXXX Global site tags to Enfold, the default Cookie settings do not work. This does not affect the old UA-XXXXXX tags.
Essential cookies accepted on load, User must Opt In – Is selected from the Cookie control options.
In order to get the Cookies to load on acceptance with the new G-XXXXXXXX codes – I have to turn on custom modal content and click save, otherwise the Google Analytics tab is missing from the cookie popup and Analytics.js / Gtag.js loads itself automatically – ignoring the cookie settings
This is probably affecting a lot of sites but the owners are unaware of the bug
p.s. No issues with the new 4.8.6.3 release. Looking forward to the Post-CSS updates coming in 4.8.6.4.
Thanks,
Tom
Hey Thomas,
Thank you for the inquiry.
Looks like an issue with the regex match. Please try to edit the helper-privacy.php file, look for this code around line 520 and 2097.
preg_match( "!UA-[0-9]+-[0-9]+!", $analytics, $match );
Replace it with:
preg_match( "/(UA|G)-([0-9]+-[0-9]|[0-9A-Za-z])/", $analytics, $match );
Let us know if it helps.
Best regards,
Ismael
I’ve just tried it on a site I am working on at the moment.
Seems to have solved the problem.
Please can you add this to the next bug fix release?