How to Show the EU User Consent Banner Only to EU Visitors

How to Show the EU User Consent Banner Only to EU Visitors

Some publishers already implemented the cookie consent policy compliance for their readers due this September 30. MonetizeMore already cited some sample implementations of this mechanism. Other publishers are wondering if it is possible for them to enhance the mechanism to make the consent banner show only for EU visitors.

The answer is yes and there are methods available depending on the skill level of the publisher. At the moment, they are quite limited and may increase over time.

Note that these are not the only solutions; these are just sample implementations to get your feet wet in what is technically termed as selective geolocation.

pgu cta

Sample 1: IPInfoDB Filter Addition for Silk Tide Cookie Consent Code on WordPress

(No coding required)

As previously shown, Silk Tide has a Cookie Consent code that can be appended directly to WordPress or static HTML sites.

1) Sign-up for a free account at IPInfoDB

There is a recent development. If you sign up for a free account at IPInfoDB, you will be able to get a free API key.

IPInfoDB API

2) Add the API key to Silk Tide

You can add this key to the Silk Tide code so that you can exclude non-EU member country visitors from seeing the cookie consent banner.

3) Paste code on WordPress Header File

This code will then be pasted on your WordPress head’s file. (Themes → Editor → Main Index Page or Header)

Paste code on WordPress Header File

4) Check other design options

You can walk yourself through the design preferences and more detailed process through Site Beam’s very handy configuration wizard.

Check other design options

Sample 2: GeoPlugin Web Service

(Coding Required)

Depending on your manner of implementation, GeoPlugin provides an open-source means of throwing out an array containing precise geolocation information based on an IP address. The plugin’s official site gives out limited samples but points to a specific line of code that can be used for EU Cookie Consent.

GeoPlugin Web Service

1) Incorporating a Geo-filter

A publisher with some web development chops can insert a conditional and embed the script to see if the site visitor hails from any of the 27 EU member countries.

A skilled web developer can customize the website’s code to incorporate a filter. Bear in mind that it’s best to find something that can be easily transferred during a website upgrade, owns an implementation procedure well-suited to your needs and skill level and complements your site’s layout well.

Should you be banning visitors from specific countries?

Interestingly, this new policy revives an old discussion sparked online about the advantages and disadvantages of banning a country from visiting your website. From a monetization perspective, if a publisher’s major traffic source comes from the EU continent, then obviously this isn’t the right solution.

Conclusion

Are you compliant with the latest EU data privacy initiatives? Sing up with MonetizeMore and we can help you set up our CMP and ensure your website is gathering user consent properly.


Related Reads:


Related Reading Materials for the Nerds:

  • freegeoip.net
  • github.com/fiorix/freegeoip
  • geoplugin.com
  • geoplugin.com/webservices/extras#eu_cookie_law
  • diveintohtml5.info/geolocation.html
  • github.com/estebanav/javascript-mobile-desktop-geolocation
  • searchengineland.com/should-you-ban-a-country-from-visiting-your-website-71667

Kean Graham

CEO and Founder at MonetizeMore

Kean is the resident expert in Ad Optimization covering areas like AdSense Optimization, DFP Management, and third-party ad network partnerships. Kean believes in the supremacy of direct publisher deals and holistic optimization as keys to effective and consistent ad revenue increases.

Get our latest ad optimization tips delivered to your inbox

Submit a Comment

Your email address will not be published. Required fields are marked *