About Cookie Banner Settings

Wix enables site owners to add a cookie banner to their site that informs visitors how their cookies are being used and prompts them to provide consent for non-essential cookie types and scripts (for example, Functional, Advertising and Analytics).

The Cookie Banner Settings API allows you to manage the following cookie banner settings on a site:

  • enabled: Whether the cookie banner is displayed.
  • theme: Choose from light, dark, or custom themes.
  • texts: Text displayed in the banner. See Banner texts default values for details.
  • revisitSettingsConfig: Whether to display a Revisit button that enables visitors to go back and change their choices.
  • declineAllConfig: Whether to display a Decline all button.
  • privacyPolicyPageInfo: A link to a page on the Wix site or to an external URL where the privacy policy can be reviewed.
  • revisitSettingsConfig: Whether to display a button that enables visitors to go back and change their choices.

The following table lists all cookie banner text keys and their default values. Using the API, you can change any of these texts to values of your choice:

KeyDefault value
accept.cookies.buttonAccept
advanced.category.analytics.headlineEnable Analytics Cookies
advanced.category.analytics.paragraphThese cookies help us to understand how visitors interact with our website, discover errors and provide a better overall analytics.
advanced.category.essential.headlineEssential Cookies
advanced.category.essential.paragraphThese cookies enable core functionality such as security, verification of identity and network management. These cookies can’t be disabled.
advanced.category.functional.headlineEnable Functional Cookies
advanced.category.functional.paragraphThese cookies collect data to remember choices users make to improve and give a more personalised experience.
advanced.category.marketing.headlineEnable Marketing Cookies
advanced.category.marketing.paragraphThese cookies are used to track advertising effectiveness to provide a more relevant service and deliver better ads to suit your interests.
decline.all.buttonDecline All
display.save.defaultSave
open.settings.buttonSettings
policy.banner.textWe use cookies on our website to see how you interact with it. By accepting, you agree to our use of such cookies.
policy.external.url" "
revisit.settings.textCookie settings
view.privacy.policyPrivacy Policy

Before you begin

It’s important to note the following points before starting to code:

  • Wix automatically recognizes which types of cookies require consent for a given site. While you can manage the text displayed for each, you can't change the list of consent types displayed to site visitors using the API.

Use cases

Terminology

  • Cookie banner: A visual notification on a site that notifies visitors how cookies are being used and allows them to provide or decline consent for non-essential cookies.
  • Revisit: When a site visitor reopens the banner to change their initial consent choices.
Did this help?

Sample flows

This article shares some possible use cases your app could support, as well as an example flow that could support each use case. You're certainly not limited to these use cases, but they can be a helpful jumping off point as you plan your app's implementation.

You might choose to manage the site's cookie banner display settings with this API, as defined in the introduction. For example, if your app manages the cookie banner display settings across multiple sites.

To change the settings:
Call the Update Cookie Banner Settings endpoint with the fields to update.
For example:

Copy
"settings": { "enabled": true, "theme": "dark", "declineAllConfig": { "enabled": false } }

You might choose to manage the texts displayed in the site's cookie banner with this API. For a complete list of default texts, see Banner text default values. For example, if your app manages the cookie banner display settings across multiple sites.

To update cookie banner texts:
Call the Update Cookie Banner Settings endpoint and pass the texts field as an object with all relevant key:value pairs.
For example:

Copy
"texts": { "accept.cookies.button": "Accept", "advanced.category.analytics.headline": "Enable all analytics cookies", "advanced.category.analytics.paragraph": "These cookies track how visitors interact with our website, help us discover errors and provide a better overall experience.", "decline.all.button": "Decline everything", "policy.banner.text": "We use cookies on this website. By accepting, you agree to our use of cookies." }
Did this help?