Skip to content

Consents Controller

The consents-controller webcomponent is responsible for managing user consents for various types of data processing activities.

To use this webcomponent correctly, you need to include two HTML elements inside it, each with the appropriate slot attribute. One element should have the value granted and the other should have the value withdrawn. The element with slot="granted" will be displayed when the user has accepted the consent, while the element with slot="withdrawn" will be displayed when the user has not accepted the consent.

Attributes

Attribute name Type Description
type string The type of consent, which can be 'functional', 'marketing', 'analytics', or 'platform'.

Example

In this example, the consents-controller webcomponent is used to manage user consent for functional cookies. The content inside the granted slot will be displayed when the user has accepted the functional category of cookies. The content inside the withdrawn slot will be displayed when the user has not accepted the functional category of cookies.

<consents-controller type="functional">
    <div slot="granted">
        Functional cookie category accepted
    </div>
    <div slot="withdrawn">
        Functional cookie category not accepted
    </div>
</consents-controller>