klaro-js
klaro-js copied to clipboard
Exclude pages on which the cookie window is displayed
The problem
According to the current law, the user must be able to access, for example, the privacy policy and the imprint without having to give consent to the cookies.
Proposed solution
Provide the possibility that the cookie window is not displayed on certain subpages, which can be entered via config.js, and that no cookies are set when the defined subpages are called.
I don't know if it's an smart solution, but you can overwrite certain values of your settings at the end of the configuration:
if ( (window.location.href.indexOf("privacy") > -1) || (window.location.href.indexOf("imprint") > -1) ) {
klaroConfig["noticeAsModal"] = false;
}
Would be happy about code improvements of my suggestion :-)