Introduction

Note: The APIs in @wix/site-window.ConsentPolicy can only be used in frontend code.

The consent policy helps you comply with GDPR and CCPA regulations, and allows site visitors to control their information.

Set up the site consent policy and cookie consent banners in a site's Privacy Center.

Did this help?

Setup

@wix/site-window

To use the Consent Policy API, install the @wix/site-window package.

Follow the installation instructions for your development environment.

Development environmentInstallation method
Wix sites (editor or IDE)Use the package manager.
Wix sites (local IDE)Run wix install @wix/site-window using the Wix CLI.
Blocks appsUse the same installation method as Wix sites.
CLI and self-hosted appsRun npm install @wix/site-window or yarn add @wix/site-window.

To import the package in your code:

Copy
Did this help?