Complianz Privacy Suite

How to show the cookiebanner in extra regions

Leon Wimmenhoeve

Leon Wimmenhoeve

Categories

Popular articles

Generating an Impressum

From release 4.4 onwards, Complianz Privacy Suite (Premium) offers a new document, the Impressum. The Impressum provides the required information for commercial websites that target

Read More
Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Cookie consent outside of Complianz supported regions

Complianz provides you with cookie consent management and legal documents for all supported regions. Currently Complianz provides full coverage for United States, European Union, United Kingdom and Canada. While we have recently added full support for Canada’s PIPEDA legislation, we have a strong ambition in providing full support for even more regions. Understandably, some users can’t wait for these extra regions, or simply want to show an opt-in or opt-out banner in extra regions. In this article we’ll show you how to implement this.

Please note: The following method only applies to Complianz Premium users, as GeoIP is required to determine your visitors’ location. For free, your chosen consent system (opt-in or opt-out, which ever applies to your region) will be applied to all users.

1. Make sure Complianz Premium runs 4.2.3 or later

We have added a filter to our GeoIP function from 4.2.3 on.

2. Create a mu-plugin

Alter the following script as desired and use it as mu-plugin. For more information about mu-plugins, read this article.

<?php
add_filter("cmplz_region_for_country", "my_cmplz_override_region", 10, 2);
function my_cmplz_override_region($region, $country_code){
  //if country code is 'AU', return us as region, so banner will behave as for US
  if ($country_code === 'AU'){
    $region = 'us';
  }
  return $region;
}

In this example you can change ‘AU’ for the region where you want to display a banner. You can change ‘us’ for any of the following:

us -> if you want to use opt-out 
eu
-> if you want to use opt-in
uk
-> if you want to use opt-in, also for statistics
ca -> if you want to follow Canada’s settings (depending on your set-up)

please note: The above used region must be active if you want to use the consent settings in another region.

Related articles

Leave a Reply

Your email address will not be published.

Subscribe