0

I have added iubenda cookie policy banner to implement GDPR on my WordPress website. However, the banner is visible on each page for all users even after closing the banner which means to save consent for the browser.

This does not work with clicking on cookie policy link and click on 'Continue to browser' button which says "By continuing to browse or by closing this window, you accept the use of cookies.".

1 Answers1

2

I have fixed it by setting the parameter enableRemoteConsent to TRUE which is FALSE by default.

According to the official iubenda document, In particular, if you set this parameter (enableRemoteConsent) to true, our solution creates a technical cookie on iubenda.com (domain) which is used when the cookie on the local domain is not found.

This was needed because in iubenda's javascript library, they are fetching domain name to save cookie using getCookieLocalDomain function which has the issue with country-based TLDs and only "co.uk" is handled. I faced the issue because my domain suffix is "com.au".

s.prototype.getCookieLocalDomain = function() {
  var e = null;
  if (this.options.localConsentDomain) return "." + this.options.localConsentDomain;
  if (e = location.hostname, "localhost" != e) {
      var t = /^[0-9]+$/.test(e.split(":")[0].split(".").join(""));
      return t || (e = this.stringEndsWith(e, "co.uk") ? e.split(".").reverse().slice(0, 3).reverse().join(".") : e.split(".").reverse().slice(0, 2).reverse().join(".")), "." + e
  }
  return ""

IlDan
  • 6,851
  • 3
  • 33
  • 34
  • 3
    Simon from iubenda here. We're actually shipping an update that handles all TLDs with this setup within days. This should take care of the issue going forward. We're always happy to help if you have any other issues. :) – Simon May 30 '18 at 07:48
  • Thank you, Simon. That would be great! Probably, how long it would take for this update? – Vivek Shingala Jun 01 '18 at 00:43