Skip to content

Configuration

Konstantinos Pappas edited this page Oct 2, 2023 · 16 revisions

The plugin’s settings are split into eight tabs:

  • General
  • Cookies
  • Translations
  • Consent Modal
  • Settings Modal
  • Blocked Scripts
  • Consent Records
  • Logs

General

screenshot-1

Under the “General” tab, you’ll find all the basic configuration options, toggleable features, color palette, etc.

Toggleable features

Option Enabled Disabled
Autorun Will show the cookie consent as soon as possible You will have to manually call the .show() method
Force consent Page navigation will be blocked until user action Users will be able to navigate without needing to consent first
Auto-clear cookies Cookies will be deleted automatically when user opts-out of a specific category inside cookie settings Cookies will have to be deleted manually
Page scripts Will manage existing third-party script tags Won't manage existing third-party script tags
Hide from bots Won't run when a bot/crawler/webdriver is detected Will always run, even when a bot/crawler/webdriver is detected
Re-consent Will ask users to “re-consent” when a cookies list changes Won't ask users for consent more than once
Record consents Will record user consents to be able to provide proof of consent for auditing purposes Won't record any user consents
  • “Autorun” will show the cookie consent as soon as possible. If disabled, you’ll have to manually call the .show() method of the global pressidiumCookieConsent object.

    // Manually show the cookie consent modal
    window.pressidiumCookieConsent.show();

    For more information about the pressidiumCookieConsent object, refer to the Control programmatically section of this wiki.

  • “Auto-clear cookies” will clear any cookies set on the Cookies tab when the user opts-out of a specific category.

  • “Page scripts” will manage third-party script tags. For more information on how to block them, refer to the Blocking Scripts section of this wiki.

Basic configuration options

Option Description Default value
Delay Number of milliseconds before showing the consent modal 0 ms
Cookie Expiration Number of days before the cookie expires 182 days
Cookie Path Path where the cookie will be set /
Cookie Domain Specify your domain or a subdomain Your site’s domain

Colors

screenshot-2

Choose one of the three predefined themes:

  • Light
  • Dark Blue
  • Dark Turquoise

Then, adjust any color you wish individually.

Cookies

screenshot-3

List all of your analytics and targeting cookies.

For each cookie, fill its:

  • Name (e.g. ^_ga)
  • Domain (e.g. example.com)
  • Expiration (e.g. 2 years)
  • Path (e.g. /)
  • Description (e.g. Google Analytics to count pageviews)

Note that the cookie names can be either exact matches or regular expressions (if you select the “Is Regex?” toggle).

The cookie tables will be displayed on the settings modal under the “Analytics” or “Targeting” cookies respectively. They will also be used by the “Auto-clear cookies” feature, which will clear these cookies when a user opts-out of their category.

Translations

screenshot-4

On the “Translations” tab, you can select the language auto-detection strategy:

  • Browser — Read the user’s browser language
  • document — Read value from <html lang="..."> of current page

Then, add languages and fill their translations.

By default, the English (🇬🇧) translation will be prepopulated for you.

Consent Modal

screenshot-5

Select the layout, position, transition, and adjust the buttons of the consent modal.

At any point, you can click the “Preview Consent” button to preview the consent modal with the currently selected settings. Note that your changes won’t be saved until you click the “Save” button.

Settings Modal

screenshot-6

Select the layout, position, and transition of the settings modal.

At any point, you can click the “Preview Settings” button to preview the settings modal with the currently selected settings. Note that your changes won’t be saved until you click the “Save” button.

Blocked Scripts

screenshot-7

On the “Blocked Scripts” tab, you can block third-party scripts from loading until the user has given consent. That way, they won’t set any cookies that the user hasn’t explicitly consented to.

For this feature to work, you’ll have to enable the “Page Scripts” option, under the General tab.

Script blocking may not always be effective due to variations in script loading methods. To make sure that you’re GDPR-compliant, you should double-check that the scripts you’ve configured are actually getting blocked. If you experience any issues, please let us know by opening an issue.

To block a script, you just need to copy-paste the URL of its src.

For example, to block the following script until the user has given consent for the “analytics” cookies:

<script src="https://www.google-analytics.com/analytics.js" type="text/javascript"></script>

You would enter the following:

Target Source Cookie Category
https://www.google-analytics.com/analytics.js Analytics

You could also use a regular expression. For example, to block any script on the *.google-analytics.com domain, you could use:

^(?:https?:)?\/\/(?:www\.)?google-analytics\.com

For more information about how to block scripts from running, refer to the Blocking scripts section of this wiki.

Consent Records

screenshot-8

Under the “Consent Records” tab, you’ll find all the consent records that have been collected by the plugin.

To enable the consent recording, you’ll have to turn on the “Record consents” option, under the General tab.

You can also export all recorded consents into a CSV file by clicking the “Export CSV” button, or permanently delete all recorded consents by clicking the “Clear Records” button and then “Delete records” in the confirmation modal.

Logs

screenshot-9

Under the “Logs” tab, you’ll find logs and other information, useful for debugging.

Clone this wiki locally