Add a cookie warning message to your site


Inform users about cookies.

If you want to be General Data Protection Regulation (GDPR) and ePrivacy compliant, you must inform your users about collection and sharing of personal information. SXA lets you inform visitors that your site uses cookies. You can customize the message, select the warning type, and exclude pages from having cookie warnings.


The privacy warning displays on every page load, until the visitor gives consent. It does not affect tracking functionality, and is merely a warning for visitors that tracking is enabled on the site.

To add a cookie warning to your pages:

  1. In the Content Editor, navigate to sitecore/Content/<tenant>/<site>/Settings/Privacy Warning.

  2. In the Privacy Warning Content section, fill in the following fields:



    Privacy Warning Content

    Enter your cookie warning statement.

    Privacy Warning Button Text

    Enter the button text. By default, it is set to Confirm.

    Privacy Warning Type

    Select the type of warning:

    • Hidden - hides the cookie notification.

    • Permissive - if the user does not give consent, log a warning and continue running as normal.

    • Restrictive - if the user does not give consent, the user cannot continue using the site.

    • Show Once - after consent, the alert will not display again.

    • Accept on Close - if the user closes the warning, it will be interpreted as consent.

    Pages on which privacy warning will not appear

    Click Edit, and in the Select items dialog box, select the pages that you do not want the privacy message to appear on.

    Learn More Button Target

    Enter a link to a privacy policy.