Refer to the User Guide for instructions on setting up the consent management policy when using Kameleoon on your web app.Documentation Index
Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt
Use this file to discover all available pages before exploring further.
Kameleoon provides native built-in integrations with Consent management platforms.
Consent policies
For a given visitor, legal consent to use Kameleoon is considered either granted, denied or unknown (a special state used when consent is not defined, as the visitor has not granted nor denied it yet). To begin, you should choose how Kameleoon treats legal consent:- Consent not required: With this policy, consent is not explicitly required for this website and module. Kameleoon assumes it is granted automatically and starts immediately in full-featured mode.
- Consent required: With this policy, consent must be explicitly obtained from the visitor. Until it is given, the legal consent will be considered to be “unknown” and Kameleoon will not operate normally.
To cover all possible use cases, Kameleoon’s Web Experimentation behavior can be further customized when consent is considered unknown or when it is denied by the user. To learn more about the available options, read the article on behavior when consent is unknown.
Reading the current consent state for a visitor
This section applies only to the Kameleoon Web Experimentation solution.
Kameleoon.API.Visitor object:
Kameleoon.API.Visitor.experimentLegalConsent: returns true, false, or null if the state is unknown (consent is required but has not yet been granted nor denied).Kameleoon.API.Visitor.personalizationLegalConsent: returns true, false, or null if the state is unknown (consent is required but has not yet been granted nor denied).
Kameleoon.API.Core.enableLegalConsent() and Kameleoon.API.Core.disableLegalConsent() methods allow you to change (write) the legal consent status for this visitor, obtaining (reading) the current state is done via Kameleoon.API.Visitor.
If you have chosen a Consent not required policy, the legal consent can never be in an unknown state. The
Kameleoon.API.Visitor.experimentLegalConsent or Kameleoon.API.Visitor.personalizationLegalConsent will always return true by default and will be set to false only if the Kameleoon.API.Core.disableLegalConsent() method is called.Modes of operation for Kameleoon Web Experimentation engine
This section applies only to the Kameleoon Web Experimentation solution.
Kameleoon.API.Visitor.experimentLegalConsent and Kameleoon.API.Visitor.personalizationLegalConsent. If the value is is null (unknown state) or false, Kameleoon takes into account the corresponding configuration value in the project settings for the Behavior when consent is unknown or Behavior in case of opt-out.
The following section describes all possible modes for the engine:
Active mode
This is the normal mode of operation. Kameleoon sends data to tracking servers and writes data to the device as needed. The visitor is supposed to have granted consent to the use of Kameleoon. This mode is operational whenKameleoon.API.Visitor.experimentLegalConsent or Kameleoon.API.Visitor.personalizationLegalConsent is true
Disabled mode
In this mode, Kameleoon does nothing at all - data is neither sent out to remote servers nor written to the local device. Experiments and personalizations are never displayed. For all purposes, it’s as if Kameleoon did not exist for this particular visitor. This mode is operational when:Kameleoon.API.Visitor.experimentLegalConsentorKameleoon.API.Visitor.personalizationLegalConsentis null, and you selected the option “Completely block Kameleoon” when consent is unknown.Kameleoon.API.Visitor.experimentLegalConsentorKameleoon.API.Visitor.personalizationLegalConsentis false, and the customer selected “Completely block Kameleoon” for the opt-out behavior.
Delayed mode
In this mode, Kameleoon does not send any data to tracking servers nor write any data to the device. However, it will still display experiments (or personalizations) normally, if the visitor triggers the associated segment. In addition, every data that should be written or sent to a remote server is kept in memory. If later Kameleoon switches to the active mode (usually because the consent is granted at some point), all the data gathered so far (in the context of this page) is written and sent at once. Thus the “delayed” name: if the full consent is obtained at some point, the end result will be that Kameleoon behaved almost like in active mode. This mode is operational whenKameleoon.API.Visitor.experimentLegalConsent / Kameleoon.API.Visitor.personalizationLegalConsent is null, and you selected the option “Do not block Kameleoon” when consent is unknown.
Restricted mode
In this mode, Kameleoon does not send any data to tracking servers nor write any data to the device. However, it will still display experiments (or personalizations) that have been flagged with the “Technical” tag in Kameleoon. All other experiments / personalizations are not displayed. This is a very useful mode that allows most Kameleoon operations to be disabled if a visitor does not want to grant consent, but that still permits critical experiments and personalizations to run for this visitor. Very often, Kameleoon is used as a quick workaround for deploying bugfixes and small improvements to production. In this particular context, data privacy regulations such as GDPR explicitely do not apply, and Kameleoon can be used without consent for such use cases. The restricted mode is equivalent to the delayed mode, but more restrictive. Since it can be chosen as a result of a final legal consent choice (a denial), it is expected that data will probably never be written nor sent in this case (whereas the delayed mode is normally only a “transitional” mode). This mode is operational when:Kameleoon.API.Visitor.experimentLegalConsentorKameleoon.API.Visitor.personalizationLegalConsentis null, and you selected the option “Partially block Kameleoon” when consent is unknown.Kameleoon.API.Visitor.experimentLegalConsentorKameleoon.API.Visitor.personalizationLegalConsentis false, you selected the option “Partially block Kameleoon” for the opt-out behavior.
It is very possible that Kameleoon will have different operational modes for AB experiments and personalizations. In that case, everything works as expected. For instance, experiments are displayed and tracking data, but nothing happens for personalizations.