NAV Navbar
  • Opt-out Cookie
  • Opt-out Cookie


    Kameleoon default tracking does not include any personal data. All results are anonymized and reports are provided without any personal data. Still, many countries provide laws that make it mandatory for analytical platforms such as Kameleoon to allow visitors the option to never be tracked at all. In order to comply with those laws, Kameleoon has an option to entirely disable itself, on a per user basis. Technically, the presence of a given cookie on the user's browser will block Kameleoon initialization (and only Kameleoon - no other solutions are disabled).

    Technical description

    Name of cookie: kameleoonOptout
    Value: true
    Duration: custom (according to your requirements)
    Domain: underlying domain of the web page where Kameleoon script is installed (the cookie is read in JavaScript)

    Kameleoon's engine will automatically attempt to read this cookie at initialization, and if it is present, will abort setup for this particular visitor (disabling itself entirely).

    Note that apart from writing custom JavaScript (or server-side) code to set the cookie, we provide another easy way to automatically create the opt-out cookie. If you add the query parameter #kameleoonOptout=true at the end of any page where Kameleoon script is installed, Kameleoon's code will automatically create the opt-out cookie with a default duration of 45 days.


        function acceptPolicy() {
            document.getElementById('footer').style.visibility = 'hidden';
        function disableKameleoon() {
            const expiryDate = new Date();
            expiryDate.setMonth(expiryDate.getMonth() + 1);
            document.cookie = 'kameleoonOptout=true; expires=' + expiryDate.toGMTString();
            document.getElementById('footer').style.visibility = 'hidden';
    <div id='footer'>
            We use various technologies to personalize content and to analyze our traffic.
            Please accept if you comply with our privacy policy, or decline if you wish to avoid tracking.
        <button type='button' onclick="acceptPolicy()">Accept</button>
        <button type='button' onclick="disableKameleoon()">Decline</button>

    On the right we provide a simple example, where our customer's privacy policy includes the ability for a visitor to opt-out of Kameleoon tracking. Therefore the customer provides a dialog that warns its visitors that some information may be tracked for personalization purposes. If they don't agree with such terms, they can avoid tracking by clicking the appropriate button.

    As the example shows, we create a cookie named kameleoonOptout with its value equal to true. The expiry date indicates when the cookie shall be removed by a browser, therefore re-enabling the Kameleoon application. The expiry date can be set based on your requirements (mainly this will depend on the laws of your country). Note that in the example on the right, the opt-out cookie is created for one month.