GDPR Cookie Consent

Last modified by Administrator on 2024/06/23 00:01

GDPR Cookie Consent

Cookie consent popup with different configuration options.

Active Installs44
3 Votes
LicenseGNU Lesser General Public License 2.1
Minimal XWiki version supportedXWiki 8.4

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.

Please note that the GDPR Cookie Consent app needs to be configured in order to register the selections done by the users. Otherwise, it will only remain as a pop-up and the selected options would not affect the analytics results. For more details on how to configure the app, check out the Documentation tab, in the section "Configure the GDPR Cookie Consent app from the XWiki Administration".

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.

Extra Step

Please note that if you already have a tracking code from a tool added to your wiki (for example from Google Analytics, Matomo or a tracker from a Marketing Automation or Sales tool), this would need to be removed or modified (see the section "Advanced usage: Modifying existing scripts/code to respect the user's options"). Afterwards, add the tracking code or script on the GDPR Cookie Consent Setup section, in the chosen options.

Extra location for the Cookie Consent Setup

Note that you can also go to the dedicated GDPR Cookie Consent Setup page where you can do the same settings presented above.


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.

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($gdprSettings = $util.decodeURI($xwiki.getUserPreferenceFromCookie("gdprSettings")))
#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

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 community website.


The price is per year and varies depending on the support level and the number of users.

Support / Users
GDPR Cookie Consent is part of the XWiki Pro package. Purchasing this package you will benefit from more extensions at a better price. Check the full offer in XWiki Pro! The GDPR Cookie Consent can be purchased individually only via online order (credit card payment), following the “How to Buy” procedure described below. The application is part of the XWiki Pro package, which can be purchased through manual order (bank transfer payment) by contacting


What do you get when you purchase an XWiki extension?

1 year license

By purchasing an XWiki extension license, you'll benefit from it during one year.

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


#38  Add decline button on pop-up banner


Bug fix:

#31 Popup not appearing on 13.x if the XWiki panels have been disabled


Bugs fixed:
#20 Accept cookies button doesn't keep the anchor from url.
#27 Some characters break the display of the pop-up window.
#30 LESSCompilerException Error when accessing GDPR Cookie Consent Setup from Administration.

#22 Allowing to select the type of cookies to be displayed on the popup.


Fixed usage of deprecated APIs that were polluting the logs with warning messages.


#21 When clicking configure, none of the options should be pre-checked.
#24 Application doesn't have support for multilingual wiki.


Bugs fixed:
#17 A regression was introduced in the last release.


Bugs fixed:
#16 Exception in logs and velocity output on the user login screen when guests have no rights.


Bugs fixed:
#12 Missing button in the page causes JS errors.


Bugs fixed:
#9 Error displayed in global wiki header

Modified default style of the pop-up from box to bar


Bugs fixed:
#1 The disclaimer in the consent popup links to Cookie Policy
#2Cookie Consent App isn't displayed in the Applications panel
#3Cannot configure box type
#4Cannot add the consent popup at the top of the page
#5Cannot change Background and Foreground colors
#6Cannot configure opacity 

#7Improve "Trigger pop-up manually" section in the Cookie Consent Setup
#8Box popup should be centered

Extension details

This information is only displayed to Administrators. Your users can't see this tab.


  • GNU Lesser General Public License 2.1




  • xar

Developed by


  • Requires XWiki 8.4 or above.

Installable with the Extension Manager


Admin error: No dependency objects. Please add at least one ExtensionCode.ExtensionDependencyClass to display it here.

XWiki SAS Copyright © 2024