Jump to content

Cookie Management Banner


adrian

Recommended Posts

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

  • 1 month later...

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

  • 11 months later...

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

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

  • 2 months later...

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.

  • Like 3
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...