Provide a migration path to Klaro

Created on 27 October 2024, about 2 months ago

Problem/Motivation

It's a bit unclear whether this work should go into the Klaro module, EU Cookie Compliance or both. With the community wishing to use Klaro for Consent Management, the user base of EU Cookie Compliance should be offered some kind of migration path so that they can leverage from the work being done in Klaro.

Proposed resolution

Provide a migration for the settings of this module to Klaro.

Remaining tasks

  • Outline the matrix for module configuration in both modules
  • Provide a migration
  • Test the migration
  • Possibly write tests so that we can ensure that the migration keeps working in the event that Klaro changes
Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇳🇴Norway svenryen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @svenryen
  • 🇩🇪Germany jurgenhaas Gottmadingen

    This is fantastic. I'd say, the code needs to go into this module and may look like this:

    • add klaro as a dependency
    • add an update_hook that enables klaro
    • add a post update hook which does the migration from this to klaro and disable itself

    This leaves the code available in the code base, but we can't do anything to remove that as we don't know where the dependency comes from, and we shouldn't change system files anyway.

    As it may be perceived invasive, if we enforce that change on users, this change should possibly go into a new major version so that normal composer updates don't catch it. That way, users will only get this update when they explicitly require it.

  • 🇳🇴Norway svenryen

    So if I understand your comment, you would want to see us have a version 2 of this module that in itself doesn't do much beyond displaying an interface and then performs an automated conversion to Klaro as soon as they type the composer command?

    No banner or features at all, just a conversion to Klaro without any easy way for site builders to return to Eu Cookie Compliance once they've upgraded to version 2.0, which they then have to remove? (Just assuming there will be sites using this feature that are not up to speed on Drupal and its latest offering in terms of Drupal CMS. They might end up a little bit confused if it all happens automatically. I haven't seen any other module that automatically uninstalls itself as part of an update, so I wonder what's the best practise?)

    Are we sure that Klaro caters for all the edge cases that this module offers? How do we handle those that by accident installed version 2 only to find out their favorite feature is missing and then feel left out?

    A different approach would be to make the conversion happen by pressing a button to confirm the migration action. Then we can let the migration take part in the 1.x version code base, and we would be able to carry over far more sites to Klaro.

    We would also be able to display some kind of report, say as a separate tab, where they can make an informed decision, and see what features they have configured in EU Cookie Compliance will be covered by Klaro (assuming we don't replicate the feature set from EU Cookie Compliance in Klaro). Sort of like a gap analysis that they opt into rather than stumble upon by accident when they thought they were going to get the latest and greatest from a module they're familiar with.

    As part of the report page where they confirm the upgrade, we can also point out the benefits of Klaro, the downsides of staying on EU Cookie Compliance (no updates besides critical bugs fixes and issues that are RTBC) to entice them into moving their config over.

  • 🇳🇴Norway svenryen

    Here's another reason we might not want to automatically convert their setup of EU Cookie Compliance into Klaro config and uninstall the EU CC module:

    CSS styles.

    Although you probably have site builders that only change the colors of the banner and the text and leave the default CSS which we can easily carry over to Klaro. However, it's common for sites in the enterprise end through to professional websites to enforce that everything should be based on their corporate design guidelines. In other words, they've customized not only the banner colors but also the typography and other aspects of the banner. And if it wasn't complicated enough, we have got several CSS styles in EU Cookie Compliance (since some people wanted a more modern look and feel to go with the Oliviero theme).

    Unless we come up with some fancy way of reading their theme CSS (which I think will be a nightmare to code for) we really should follow what I referred to above as an informed opt-in action acknowledging what will happen and perhaps also with a crash course in how to style Klaro, so that they can prepare a style sheet where the banner still looks great (whether they want it to look like it did in the past of leverage the features of Klaro to make it look even better), then they can follow whatever process they have to stage stage that, test it, have their management accept it, and make the move once they're ready. Fewer things can go wrong when the upgrade is just a tad less automatic.

    I'm just thinking out loud here, we should provide the best experience when moving over to Klaro, and there might be other reasons beyond the ones I mention here that call for an upgrade path that doesn't just happen automatically.

  • 🇩🇪Germany jurgenhaas Gottmadingen

    I'm fully on board with what you said in your last 2 comments. When I read the original issue, my concern was that the migration path would be automatic and I only suggested the version 2 approach to prevent that from happening automatically.

    Doing it the way you described with a button where the migration only happens on explicit request by the user is even better then what I suggested.

  • 🇳🇿New Zealand atowl

    Sven, could we just provide a migration a button from the /admin/config/system/eu-cookie-compliance area?

    I think i agree with not digging into reading the theme css, but we could provide a style sheet with any text/background colors, heights/widths etc, that they have defined if the switch for include minimal css is off.

  • 🇳🇿New Zealand atowl

    I have spent a bit of time to do feature map that EUCC has and where they map to in Klaro

    I'm ignoring any style demands presently.

    I'll attach the spreedsheet for now, i could also do it in a google sheet instead if its easier?

  • 🇳🇴Norway svenryen

    Sven, could we just provide a migration a button from the /admin/config/system/eu-cookie-compliance area?

    Thanks for the analysis work. I'll take a look at the spreadsheet later.

    This is what I've proposed, and have approval from module sponsors that they can help fund: What we want is a separate tab in EU Cookie Compliance admin, named "Migrate to Klaro", where we briefly explain what's going on (the TL;DR), lay out the gap analysis of what settings will remain the same (based on your spreadsheet) and what will be different in Klaro. Perhaps also some hints to how to transform custom CSS styles that they may have applied in EU CC.

    Then, when the site owner has read and digested this information, they can click a button (as you say) to Migrate to Klaro.

    What will then happen could be something like this:

    1. enable the Klaro module
    2. migrate the settings from EU CC to Klaro
    3. there was a suggestion that we should disable the EU CC module. When giving it some thought, I think it's best to leave EU CC enabled, but restrict it's functionality to a tab saying "Revert to EU Cookie Compliance", which is in place of the "Migrate to Klaro" tab that will be hidden after the migration is complete. No banner will be shown from EU CC and the javascript wil not be embedded, unless they decide to revert.
    4. after migration, if they like the new module, they can manually uninstall and remove EU CC from their site, with the EU CC admin page displaying instructions for how to uninstall the module manually or with composer

    A notice banner that shows up (but without being obtrusive) guiding the site admin to the new tab could also be considered. Perhaps it can show up and then be possible to dismiss if they decide not to follow the recommendations.

    The plan is that a mockup of the functionality will be available on Monday. Ramsalt will also pull from our resources and make a developer or two available to work on this in November, but you're most welcome to help out.

    Let me know what you think.

  • 🇳🇴Norway svenryen

    The spreadsheet opened without problems in Excel, so it seems fine that it's an ods.
    Possibly it could also be imported in Google Sheets.

    When briefly looking at the gap analysis, what I'm not sure we've covered is the cookie format (the actual consent storage where consent is stored as well as with categories).

    If we're able to transfer most of the settings, and the privacy/categories remain the same, it would be fantastic if the end user/site visitor doesn't have to give consent again.

    Consider the scenario:

    • I visit the site in november 2024
    • The site mogrates to Klaro in January 2025
    • The site should still know what I consented to and not display a cookie consent banner/button again

    Since this is important, should we move it to a separate issue here in the queue?

  • 🇳🇿New Zealand atowl

    I think what you've proposed sounds resonable, rather than attempting to remove or disable the EUCC module we should probably just disable the banner (with a message saying please configure Klaro) and enable a Klaro banner instead. I feel its like almost like disabling our module but not quite.

    To address your scenario, which is a great example. I would say that if a site migrates to Klaro then the consent banner should be shown again. My reason is that the site has changed consent managers so this in my opinion is almost like changing privacy versions.

  • 🇳🇴Norway svenryen

    I would say that if a site migrates to Klaro then the consent banner should be shown again. My reason is that the site has changed consent managers, so this, in my opinion, is almost like changing privacy versions.

    I still disagree. If you have the same cookie categories, and the privacy statement doesn't change, there shouldn't be any need to display the consent banner again.

    Maybe we could have a section about this on the "Migrate to Klaro" page. The summary/gap analysis we've been discussing could conclude that there are either 1) no changes when moving to Klaro or 2) Klaro won't have the same configuration; list the actual changes.

    If there are no changes, we can have a section that says something like "We've identified that the migration can migrate the settings in Klaro, do you still plan to update your privacy policy?" with a "Yes" or "No". If it's a "No", we display a checkbox "Do not show the consent banner/options again after migrating". Then the site owner can decide not to show the banner, in the case where the settings and categories will be identical in EU CC and Klaro.

  • Pipeline finished with Success
    about 1 month ago
    Total: 51s
    #341221
Production build 0.71.5 2024