froot Posted July 21, 2020 Share Posted July 21, 2020 Could you please help me brainstorm why the banner just wouldn't show up on the frontend? I'm out of ideas. I tried all the usual troubleshooting suspects already: clearing cache, clearing cookies, testing in other browsers, incognito mode, uninstalling/reinstalling, testing on local and live server, testing css rule conflicts, javascript conflicts, … but nothing seems to work. The same goes for the other similar module MarkupCookieConsent, just wouldn't show up. It works for another website I built though. Many thanks! Link to comment Share on other sites More sharing options...
wbmnfktr Posted July 21, 2020 Share Posted July 21, 2020 Probably a missing </body>. 2 Link to comment Share on other sites More sharing options...
froot Posted July 21, 2020 Share Posted July 21, 2020 thanks, that did it! Link to comment Share on other sites More sharing options...
jploch Posted August 25, 2020 Share Posted August 25, 2020 Thanks for this module! After I implemented the banner into a client website. A client complained recently that the visitor numbers drop to circa 1/4 of the usual numbers from Google Analytics. Now I need to verify that nothing is wrong with my implementation. Iam using pro cache on the website and implemented the GA code with the "pwcmbAllowCookies" check like this inside the head of my main template ("my UA Number" is replaced with the real number on my live site, I just removed it for this post) : <script> if (localStorage.getItem('pwcmbAllowCookies') === 'y') { window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'my UA Number'); } </script> Is this the correct way of implementation, could the cache somehow cause trouble? EDIT: Never mind! I forgot to also fire the cookies right after the "accept cookies" button was clicked. The tracker was only fired once the browser reloaded, so the first visit wasn't tracked, even if the user clicked accept. Link to comment Share on other sites More sharing options...
MattCeb Posted July 26, 2021 Share Posted July 26, 2021 Hi, I installed this module on a website today, and it worked fine. Then we went on and installed an SSL certificate, and now it won't fire on the https version of the site even though it's activated and the processwite frontend itself is working on https. Anybody got any ideas why? Link to comment Share on other sites More sharing options...
wbmnfktr Posted July 27, 2021 Share Posted July 27, 2021 Hey @MattCeb, welcome on board. As you describe it there shouldn't be any problem so far. There is one thing... the cache. So you might want to try to delete the cache within ProcessWire, your browser and even all your cookies. Another thing could be a missing opening/closing body or html tag. But in that case it wouldn't have worked any time so I think that shouldn't be the case. Another thing... the ProcessWire CookieManagementBanner is a super valid solution for everyone that wants full control about everything but there is another great module called PrivacyWire by @joshua which in some cases might be even better as you built-in support for much more. Link to comment Share on other sites More sharing options...
adrian Posted October 15, 2021 Author Share Posted October 15, 2021 IMPORTANT ALERT!!! Hi everyone, I had a site today that was loading really slowly for the first view for guest users. Turns out the https://restcountries.eu API that this module uses to determine if the user is in Europe is down at the moment, so loading of the site was waiting on a timeout from the failed call to the API. Now obviously the correct thing to do is for this part of the module (if enabled) to make this call asynchronously via AJAX so that it doesn't impact the loading of the site. The logic also needs to be updated so that the banner is also displayed if it can't find the visitor's region. At the moment it only works as a fallback if it can't get their IP address, which is obviously not very useful if the APIs are down. 4 Link to comment Share on other sites More sharing options...
Arctic Posted November 1, 2021 Share Posted November 1, 2021 On 10/15/2021 at 5:43 AM, adrian said: IMPORTANT ALERT!!! Hi everyone, I had a site today that was loading really slowly for the first view for guest users. Turns out the https://restcountries.eu API that this module uses to determine if the user is in Europe is down at the moment, so loading of the site was waiting on a timeout from the failed call to the API. Now obviously the correct thing to do is for this part of the module (if enabled) to make this call asynchronously via AJAX so that it doesn't impact the loading of the site. The logic also needs to be updated so that the banner is also displayed if it can't find the visitor's region. At the moment it only works as a fallback if it can't get their IP address, which is obviously not very useful if the APIs are down. I had this same problem with sites suddenly timing out or taking 30 seconds or more to load, and I just could not figure it out. I ended up unchecking the EU users option (sorry rest of the world) and finally things are back to normal. Link to comment Share on other sites More sharing options...
Andy Posted May 9, 2022 Share Posted May 9, 2022 @Адриан I found today that not all phrases are translated. This applies to the configuration file. I can't understand why this is happening. array( 'type' => 'checkbox', 'name' => 'autoload_assets', 'label' => __('Autoload Assets'), 'description' => __('Autoload module CSS and JS files.'), 'notes' => __("If you disable this, you will need to load these files manually:\n```<link rel='stylesheet' type='text/css' href='/site/modules/CookieManagementBanner/assets/css/CookieManagementBanner.css' />\n<script defer src='/site/modules/CookieManagementBanner/assets/js/CookieManagementBanner.js'></script>```\nNOTE: you must load the JS file with the defer attribute."), 'value' => 1 ), The configuration does not use translation, but shows the original text. The angle brackets are not displayed as they should be. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now