Closed samhotep closed 5 months ago
hey @samhotep, i did a quick test and the results are much better, however, GTM still seems to load earlier than the default consent:
After accepting cookies,
- There should be a
{"consent", "update"}
object in the dataLayer
Is the object with "consent", "default" in it supposed to go away after accepting the cookies? It currently stays there, alongside the one with "consent", "update".
After accepting cookies,
- There should be a
{"consent", "update"}
object in the dataLayerIs the object with "consent", "default" in it supposed to go away after accepting the cookies? It currently stays there, alongside the one with "consent", "update".
Yeah it stays there by default
@samhotep another issue is that the update seems to somehow work in reverse way, in another test, i only allowed essential cookies, which resulted in this update push:
{"ad_storage":"granted","ad_user_data":"granted","ad_personalization":"granted","analytics_storage":"granted","functionality_storage":"denied","personalization_storage":"denied","security_storage":"granted"}
@samhotep another issue is that the update seems to somehow work in reverse way, in another test, i only allowed essential cookies, which resulted in this update push:
{"ad_storage":"granted","ad_user_data":"granted","ad_personalization":"granted","analytics_storage":"granted","functionality_storage":"denied","personalization_storage":"denied","security_storage":"granted"}
This happens because the default object has all values denied, so any selection, even essential will cause some update since some values will be updated to true
I basically just followed the existing cookie logic, which starts with no cookies, and sets the essential
cookies only after the user has dismissed the notification
@samhotep another issue is that the update seems to somehow work in reverse way, in another test, i only allowed essential cookies, which resulted in this update push:
{"ad_storage":"granted","ad_user_data":"granted","ad_personalization":"granted","analytics_storage":"granted","functionality_storage":"denied","personalization_storage":"denied","security_storage":"granted"}
This happens because the default object has all values denied, so any selection, even essential will cause some update since some values will be updated to
true
my bad, wrong selection choice, sorry please discard!
@samhotep on this demo, GTM still loads first for me
@samhotep on this demo, GTM still loads first for me
is it possible that
cpNs.cookiePolicy();
doesn't push the required values into the dataLayer before GTM is loaded?
@samhotep on this demo, GTM still loads first for me
is it possible that
cpNs.cookiePolicy();
doesn't push the required values into the dataLayer before GTM is loaded?
You're right, I've made the changes in the cookie policy, thanks! I'll update the version as soon as it's released and we can QA again
Done
QA
dataLayer
{"consent", "default"}
object in the dataLayer{"consent", "update"}
object in the dataLayer