As far as I can see there is no GDPR compliant cookie consent banner support built in to Dataverse. What is the best practice or suggestion of the community in this regard? Has anyone added such a banner to their installations? If yes, how?
I can only see one cookie used in the system, which is the standard J2EE JSESSIONID. But we would also like to add google analytics, which should be made optional, therefore we need to provide the users with a cookie-tracker management banner.
I am currently evaluating this library for this purpose https://cookieconsent.orestbida.com/, but if anyone has experience with how to do this in Dataverse, I would be grateful for any suggestions.
This library is pretty easy to use. I could add a basic cookie consent panel available both in English or Hungarian based on the current Dataverse language and it can enable/disable the google analytics script I added to dataverse_template.xhtml
Very cool. Would it also work in the optional header or footer? Instead of hard-coding it into the template.
The only requirement is to have the script loaded on practically every page, so no matter where the users start using Dataverse they are presented with this popup.
What do you think the best place would be for this?
Hmm, I think I'd suggest a custom footer. If you haven't played with it, here are the docs: https://guides.dataverse.org/en/6.1/installation/config.html#footer-block
Oh, I see. As we have a lot of customization already all over in our Dataverse fork, I think we are OK with the template. But for other installations the custom header makes the most sense, I agree (google analytics code should be closest to the beginning of the page.)
Yeah, I'm thinking of non-forks, how they might be able to follow your lead. Do you plan to do some sort of write up? Maybe post something on the Google Group?
Is there maybe a section for these kind of customizations, hacks in the documentation? I can add a write up there, sure.
Hmm, maybe we could just throw it on that configuration page? Where would you look for it?
Maybe in Branding Your Installation or under or after Web Analytics Code.
Regarding implementation, maybe the analytics-code.html would be the best place to put the cookie consent code, as it would make a lot of sense semantically as well, because we mostly need the users' consent regarding analytics tracking.
Added this PR: https://github.com/IQSS/dataverse/pull/10320
I see, under https://dataverse-guide--10320.org.readthedocs.build/en/10320/installation/config.html#web-analytics-code
Hmm, I wonder why the image isn't showing up. :thinking:
Anyway, this is great! Thanks!
You are welcome. Can you please also test whether the actual procedure of adding the consent popup as I described works for you?
Well, probably not today but sure. :grinning:
@Balázs Pataki I finally got around to fixing the image. Please see https://github.com/IQSS/dataverse/pull/10320#issuecomment-2379365698
Also, I'm wondering if we should bring this to the new #docs group for their opinion.
We set up ours with https://tarteaucitron.io/en/ , but @luddaniel @Jérôme Roucou are the ones that could give you more details about it :)
@Balázs Pataki we pulled your #10320 into the current sprint but it needs your attention. Can you please check out my comment from Sep 27? Or if you give me write access I'll push the changes myself. :smiling_imp:
Sorry, yes, sure, I will check those!
Thanks!
I merged your changes in the PR, built the docs. Looks good to me. Do I need to do anything more?
Can you please merge the latest from develop into your branch?
Pff, didn't push it, sorry about that. What about now?
Let's take a look at https://dataverse-guide--10320.org.readthedocs.build/en/10320/installation/config.html#adding-cookie-consent-for-gdpr-etc
Looks like what I have locally.
I like it. Can you please add a release note snippet? At doc/release-notes/10320-cookie-consent.md or whatever. It can say something like this:
## Cookie Consent Popup (GDPR)
For compliance with GDPR and other privacy regulations, advice ) on adding a cookie consent popup has been added to the guides. See the new [cookie consent](https://dataverse-guide--10320.org.readthedocs.build/en/10320/installation/config.html#adding-cookie-consent-for-gdpr-etc) section and #10320.
I wrote that quickly so please fix any typos :sweat_smile:
Sure thing! This time, a complementary push is included with the commit. :smile:
it's a good combo :crazy:
approved! thanks!
@Balázs Pataki it looks like @Omer M Fahim suggested a change at https://github.com/IQSS/dataverse/pull/10320 and I agree with it.
Last updated: Nov 01 2025 at 14:11 UTC