GDPR Cookie Consent
| Category | Application |
| Active Installs | 34 |
| Rating | |
| License | GNU Lesser General Public License 2.1 |
| Minimal XWiki version supported | XWiki 15.10 |
| Sources | Issues |
The GDPR Cookie Consent app allows you to achieve and maintain cookie compliance. With this app you can group cookies into categories. You can then set up a screen that asks for your user's consent to activate or disable the cookies or trackers.
Cookies can be grouped in the following categories, depending on the different tool types:
- necessary: cookies which are mandatory and cannot be disabled
- preferences: cookies or trackers which are optional and enabled by default; they are only used to remember the user preferences
- statistics: cookies or trackers which are optional and enabled by default; they are used to record anonymous statistics
- marketing: cookies or trackers which are optional and disabled by default; they can record personal information
The Consent screen
When the GDPR Cookie Consent app is active, users will see the below screen. After clicking "I accept all cookies", the cookie screen will disappear.

Configuring the user preferences
If the users would rather prefer to select specific cookies that they would consent to, they need to click on the "Configure" button. They will be provided with the cookies categories to choose from, and when they have finished, they would click on the "OK" button.

External resources
Configure the GDPR Cookie Consent app from the XWiki Administration
How to make the app work? This section is dedicated to the administrators of the wiki, as they would first need to configure the GDPR Cookie Consent app in order to activate it.
As an administrator, please go to the Global Administration of your wiki > the section Other > the section GDPR Cookie Consent Setup.
The app administration offers you the following features:
- From the application Administration you’ll be able to see the accepted cookies for the current user.
- You’ll be able to configure the look and the content of the pop-up screen.
- Most importantly, you will need to add the cookie script or tracker to the desired three categories (preferences, statistics and marketing) in order to activate the app.
Where do you get the cookie scripts or trackers? Depending on your tool, you will need to find the tracking code on the tool, copy it and then paste it in the selected category (for example, analytics tools could be matched with the statistics category). This action will connect the tool with the GDPR Cookie Consent app.






Configuration fields
The settings are grouped in the administration section as follows.
General
| Field | Default | Description |
|---|---|---|
| Active | yes | When set to no, nothing is emitted and the pop-up never appears. |
| Type | bar | bar displays a full-width strip, box a centred panel of maximum 400px. |
| Position | bottom | top or bottom. |
| Animation | slide | none, slide or fade (1 second). |
| Background color | FFFFFF | Background of the pop-up. |
| Foreground color | 333333 | Text colour of the pop-up. |
| Opacity | 1.0 | From 1.0 down to 0.0 in steps of 0.1, applied to the whole pop-up. |
Customize labels
| Field | Default | Description |
|---|---|---|
| Modify the "necessary" / "preference" / "statistics" / "marketing" label | (empty) | Overrides the checkbox label. When left empty, the translated default is used. |
| Active cookie types | all four | Which categories are offered in the configuration pane, and in which order. If none is selected, the pop-up does not appear at all. |
| Locale | current locale | Read-only. Identifies the language this configuration applies to. |
Letting visitors change their choice
Give any clickable element the id ResetCookies. Clicking it clears the stored choice and re-opens the pop-up:
{{html}}<a href="#" id="ResetCookies">Reset cookie options</a>{{/html}}
Advanced usage: Modifying existing scripts/code to respect the user's options
This situation is met when there already is an existing script added on the instance from a chosen tool. If it would not be removed, the tech administrator could add a wrapper code to the tool script in order to read the options from the GDPR Cookie Consent app. Check out the details below for this procedure.
| Field | Description |
|---|---|
| Preferences Scripts | Code injected on every page once the visitor has consented to preferences. |
| Statistics Scripts | The same, for statistics. |
| Marketing Scripts | The same, for marketing. |
The GDPR Cookie Consent app actually adds a cookie itself in order to remember the visitor's preferences.
This cookie is called "gdprSettings" and stores an array which can have some or all the following values depending on what the visitor chooses:
The example below shows one way to determine if a particular option was chosen using the velocity scripting language:
#set($gdprArray = $gdprSettings.split(','))
#set($hasStatistics = $gdprArray.contains('preferences'))
#set($hasPreferences = $gdprArray.contains('statistics'))
#set($hasMarketing = $gdprArray.contains('marketing'))
#if("${hasStatistics}" == "true")
##Insert here the code that will be executed only if the preferences and statistics checkboxes were checked
#end
The gdprSettings macro
It takes no content, supports inline mode and accepts one optional parameter:
| Parameter | Mandatory? | Default | Description |
|---|---|---|---|
| gdprHas | No | none | One of preferences, statistics or marketing. Outputs true or false. When omitted, the macro outputs the full list of accepted categories. |
{{gdprSettings gdprHas="statistics" /}}
If the visitor has not answered yet, the macro displays "The current user has not yet accepted the cookie policy" instead.
Thus, if there are applications or tracker in another part of the wiki which were not set to pass through the GDPR Cookie Consent app and cannot be resumed to html tags, they can be modified to read the users options before executing the tracking code.
This standard application can be installed using the XWiki extension manager. More information on how to install and manage extensions can be found on the xwiki.org community website.
Options
The price is per year and varies depending on the support level and the number of users.
| Support / Users |
|---|
Benefits
What do you get when you purchase an XWiki extension?
1/3 years license
By purchasing an XWiki extension license, you'll benefit from it during one or three years, depending on the chosen engagement period.
Free updates
You benefit from all the extension updates during one year. You are always up to date.
Support included
If you are facing an issue, you can reach the XWiki support. Our team is always available to help.
How to Buy
To buy, install this extension from inside your XWiki instance and follow the instructions.
Release notes
Extension details
License
- GNU Lesser General Public License 2.1
Sources
Issues
Type
- xar
Developed by
Compatibility
- Requires XWiki 15.10 or above.
Dependencies
- org.xwiki.platform:xwiki-platform-sheet-ui 15.10
- org.xwiki.platform:xwiki-platform-administration-ui 15.10
