Allow dependencies between services.

Created on 8 February 2023, almost 2 years ago
Updated 13 August 2024, 3 months ago

Problem/Motivation

We have the use case that accepting "Google Analytics" needs to also enable "Google Tag Manager" because it is injected from GTM. This dependency is not possible with the current klaro configuration.

Proposed resolution

Add a custom JS to check if the config has the "dependencies" key on services and when one is enabled/disabled the dependent services will be also activated or deactivated.

The service should look like this:

      {
            "name": "google-analytics",
            "title": "Google Analytics",
            "purposes": [
                "statistics"
            ],
            "default": false,
            "cookies": [
                "\/^_ga*$\/",
                "\/^_gid*$\/"
            ],
            "dependencies": ["google-tag-manager"]
        }
📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

🇷🇴Romania szloredan

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

Comments & Activities

Production build 0.71.5 2024