Search
Close this search box.

Documentation

In this article

Category: ,

Categories

Recent articles

Cookies from Complianz, what are they for and how can you use them

A dedicated article for developers is located here and updates when needed.

It may sound funny, but to handle the blocking of cookies on your site, we use… cookies. Of course, these are cookies that won’t store personally identifiable data from users and are functional, non-track cookies.

  • cmplz_marketing: user has consented to the marketing level of cookies
  • cmplz_event_*: user has consented to a custom event defined by the website owner
  • cmplz_id: non identifiable user-id used for A/B testing
  • cmplz_choice: tells us if the user has made a choice or not
  • cmplz_stats: user has consented to the statistics level
  • cmplz_preferences: user has consented to the preferences level

Apart from the cookies Complianz Privacy Suite also uses the local storage in a user’s browser to store data for the cookie banner. What you will see when you open the developer tools in Chrome (view/developer/developer tools/application), then look up the local storage from Complianz, is something like this (some html and strings from the banner styling will also be present):

cmplz_user_data:

{“banner_version”:”176″,”version”:”3.0.9″,”a_b_testing”:”1″,”do_not_track”:false,”consenttype”:”optin”,”geoip”:”1″,,”current_policy_id”:”10″}

  • banner_version: to make sure the user has the most recent version of the cookie banner settings, when you change your banner settings this version will get increased. When a user visits your site, we will get served the banner from the local storage, unless the banner version has changed.
  • version: does the same thing, but now only when the plugin has been updated
  • ab testing: this is true when a premium user has a/b testing enabled. Visitors will see different banners then, and banner conversion will be tracked. A-B testing is a premium feature.
  • do_not_track: how to handle Do Not Track signals.
  • consenttype: the type of consent that is required based on your region. Currently, we have EU, US, and other regions. Coming soon are UK (after the Brexit) and Canada (Pipeda). These regions will decide if the consenttype is “opt in” (EU, UK), “opt out” (US, CA) or none.
  • geoip: This decides if the consenttype is dynamic, based on the actual region of the user, or if it as the consenttype used by the region where the website’s owner is located. Geo IP is a premium feature.
  • currentpolicy id: tells the banner if the current user has accepted the most recent cookie policy.

How to make use of this info.

There are several things you can do with this info:

  • Run scripts based on the consenttype
  • Run scripts based on the consent level

To use the consenttype, you can just request the data from the local storage:

Because this data may not be available the first pageload (it’s loaded asynchronously after the page has loaded, to minimise impact on page loading), you might consider using our jQuery hook to handle this. This Complianz jQuery event runs on consent, and also passes the consent level. Here you can do something based on the consent level (‘all’, ‘statistics’, or your custom event), but as mentioned previously, you can also request the local storage here, and do something based on the consenttype.

Join 900.000 users and install The Privacy Suite for WordPress locally, automated or fully customized, and access our awesome support if you need any help!

Complianz has received its Google CMP Certification to conform to requirements for publishers using Google advertising products.