68publishers / cookie-consent

:cookie: Cookie-consent widget with GTM, GCM & CMP integration
MIT License
112 stars 28 forks source link

GTM integration does not work #22

Closed PavelWeirich closed 2 years ago

PavelWeirich commented 2 years ago

When I used the GTM template and deployed it via GTM, sometimes the Cookies consent window appears in Google Chrome browser (v96.0.4664.110). Firefox v95.0.2 and Edge v96.0.1054.62 do not display anything. But JS and CSS files are downloaded. Tested on OS Win10 21H2 (build 19044.1415).

Snippet from FF: obrazek

Snippet from Edge: obrazek

I tried it on another PC Win10 21H2 (build 19044.1415): Cookie consent didn't appear in any browser. Mobile Android 11 - browser Chrome - nothing.

tg666 commented 2 years ago

Hello, We have a deployed/submitted container for our app and everything works in all browsers. Also, no one reporting the same or similar problem as you. Can you provide more information?

Snímek obrazovky 2021-12-30 v 0 20 32

or something else that could help me. Thanks.

PavelWeirich commented 2 years ago

I used template v0.2.7.

Now, in GTM, I deleted the old tag and template. Imported a new template v0.3.0 and created a new tag (with default values).

obrazek

Testing: my PC (W10) - Google Chrome -> Show cookie conset my PC (W10) - other browsers (FF and Edge) -> nothing mobile - Android - Chrome -> nothing second PC at home (W10) -> nothing in all browsers (FF, Chrome and Edge) PC at work (W10) -> nothing in all browsers (FF, Chrome and Edge)

Result of commands CookieConsentWrapper and CookieConsentWrapper.unwrap(); see image obrazek

tg666 commented 2 years ago

@Sikipiki Hello,

We looked on your website that you sent to Vojta and I think I found the problem. Initialization of the original plugin is placed into an event window.addEventListener('load', ... the original plugin initialization ...) and your page is so small that it loaded before the event attached. Of course, it's a bug so I fixed it in a beta version 0.3.1-beta.0. Can you update the field Package version in the configuration of your tag and tell if everything works OK?

Snímek obrazovky 2021-12-31 v 3 33 40

Then I'll release it as a stable version. Thank you!

PavelWeirich commented 2 years ago

Thank you. It works!

Dne 2021-12-31 03:34, tg666 napsal:

@Sikipiki [1] Hello,

We looked on your website that you sent to Vojta and I think I found the problem. Initialization of the original plugin is placed into an event window.addEventListener('load', ... the original plugin initialization ...) and your page is so small that it loaded before the event attached. Of course, it's a bug so I fixed it in a beta version 0.3.1-beta.0. Can you update the field Package version in the configuration of your tag and tell if everything works OK?

[2]

Then I'll release it as a stable version. Thank you!

-- Reply to this email directly, view it on GitHub [3], or unsubscribe [4]. Triage notifications on the go with GitHub Mobile for iOS [5] or Android [6]. You are receiving this because you were mentioned.Message ID: @.***>

Links:

[1] https://github.com/Sikipiki [2] https://user-images.githubusercontent.com/24430186/147799708-bd147983-2d5f-4e59-b4a2-828a5de208a1.png [3] https://github.com/68publishers/cookie-consent/issues/22#issuecomment-1003244844 [4] https://github.com/notifications/unsubscribe-auth/AB6B7R2AKLK2HVYABVNIUZDUTUJCFANCNFSM5K6KBPNA [5] https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 [6] https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

tg666 commented 2 years ago

Perfect! I'm going to release the version 0.3.1.