Latest News, Updates, Tutorials and much more


How to Geographically Target Your Cookie Compliance

Targeting Visitors from EU

General Data Protection Regulation (GDPR) is a regulation created for all websites that operate and collect user data within EU member states. It is not required to collect consent from visitors coming outside of the European Union.

A similar rule applies to California Consumer Privacy Act (CCPA), so some websites might be interested in showing Cookie Consent popup only for visitors from California.

In order to meet our client demand, we have created an option to only target visitors coming from EU countries, only visitors coming from California, or visitors coming from one of those locations. This can be set when getting code from the Installation tab in the banner settings:


Click one of four buttons to activate Geo-targeting. New code will be generated, which should be copied and used on your website.

Different Banners for Locations

Since GDPR and CCPA regulations are very different, we have added the possibility to include different banners for different locations. So you can set up two different cookie banners (with different settings) and add one with EU geo-targeting and another with California geo-targeting. They will not conflict with each other and the proper script will be taken for each location. Visitors coming from somewhere else will not see the banner, all disabled third-party scripts (if you have any) will get enabled automatically.

Few more things to note when using geo-targeting:

  1. It requires you to update CookieScript code on your website if you are not using EU geo-targeting yet.
  2. All third-party scripts will be automatically activated if a visitor comes outside of a geo-targeted location.
  3. Geo-targeting does not work with self-hosted code since visitor IP is checked on CookieScript servers.

New to CookieScript?

CookieScript helps to make the website ePrivacy and GDPR compliant.

We have all the necessary tools to comply with the latest privacy policy regulations: third-party script management, consent recording, monthly website scans, automatic cookie categorization, cookie declaration automatic update, translations to 34 languages, and much more.