Add a cookie banner to every Wix page with Custom Code
Add the TermsFeed Privacy Consent cookie banner to every Wix page with a Custom Code entry placed in the head, in about 3 minutes. Custom Code needs a published site with a connected domain, and a connected domain needs a Wix Premium plan (a Studio plan for a site built in Wix Studio).
The whole setup, with the Wix consent banner and Marketing Integrations, takes 5 steps and about 20 minutes. Have owner or admin access to the site dashboard, and copy your snippet from "Install link" on the Overview page in the TermsFeed app. Make one first with Create a Consent Banner where you have none.
Step 1: Add the Privacy Consent snippet with Wix Custom Code
Add the snippet as a single entry on all pages, placed in the head. An entry set to one page leaves every other page with no consent banner.
Create the entry from the site dashboard, as the Wix Custom Code article shows.
- Open Settings in your site dashboard.
- Open Custom Code in the Development & integrations section.
- Click + Add Custom Code at the top right.
- Paste the snippet into the text box and name the entry "Privacy Consent".
- Select All pages under Add Code to Pages, and choose Load code once.
- Select Head under Place Code in.
- Keep Essential on the Code Type tab and click Apply.
Your snippet has this form, with your own token in its address.
<!-- Privacy Consent by TermsFeed (https://www.termsfeed.com) -->
<script type="text/javascript" src="https://cdn.termsfeedtag.com/plugins/pc/v1/YOUR_TOKEN/plugin.js" async></script>
<!-- End Privacy Consent by TermsFeed (https://www.termsfeed.com) -->
Essential, the Wix default, loads the entry before any consent. While the Wix consent banner is on, Wix holds an entry of another type until the visitor accepts that type, so the Privacy Consent banner does not appear.
Step 2: Turn off the Wix consent banner
Turn off the Wix consent banner with its "Show banner" toggle, so visitors answer one consent banner instead of 2. Wix offers its consent banner through Usercentrics, from Privacy & Cookies in the dashboard, according to the Wix help page on cookie consent. A site that kept the older Wix "Cookie Banner" finds the same toggle in its settings.
Wix tools then run under the default consent policy of the site, which allows every cookie type unless a consent app changes it. Privacy Consent does not hold back Wix Analytics or the session cookies Wix sets for its own features, because Wix loads them with no code you move into a vendor. List them in your Cookies Policy, and read the other limits in Blocking Limits.
Step 3: Move Wix Marketing Integrations into Privacy Consent vendors
Move each tool in Marketing Integrations into a vendor, so it waits for consent. A tool connected there runs outside Privacy Consent, before the visitor answers, and the Wix consent policy no longer holds it once the Wix consent banner is off.
Wix states that tracking scripts such as Google Analytics and the Meta Pixel "do not work through custom code", and it points to Marketing Integrations. A vendor tag is not a Custom Code entry, but test it before you disconnect the tool.
- Open Marketing Integrations in the site dashboard and note each connected tool with its ID.
- Add the tool as a vendor in the Vendors Manager, from its template where one exists.
- Accept the consent banner on your live site in a private window, and confirm that the real-time report of the tool shows the visit.
- Disconnect the tool in Marketing Integrations.
- Remove any copy of the same code from other Custom Code entries.
Each template form asks only for the IDs of its tool. Choose it in Add From a Template, and use Add a Custom Vendor for a tool that has none.
An Embed HTML element runs its code in an iframe, which the Privacy Consent script on the page does not read. A replaceable tag or a preferences link inside that element does nothing.
Step 4: Add a way back to the Privacy Preferences Center on Wix
Turn on the floating button of the consent banner, so every Wix page offers a way back to the Privacy Preferences Center. Open the Appearance page of the consent banner in the TermsFeed app, switch on "Use a sticky button to open the Privacy Preferences Center?", and save.
A text link works too, in its own Custom Code entry on All pages, placed in Body - end. Wix places that entry after your site content, so the link shows below the content on every page. Compare the methods with Reopen Preferences.
<a href="#" id="open_privacy_preferences_element">Privacy Preferences</a>
Step 5: Add the Wix hostnames to the consent banner
List each Wix hostname that carries the snippet, other than the main website domain, under "Additional domains" on the Settings page in the TermsFeed app. Wix runs Custom Code on the connected domain, so the wixsite.com address of the site needs no entry. The consent banner loads only on the main website domain and the additional domains, so a connected domain missing from the list shows none. Follow the steps in Multiple Domains.
How to verify Privacy Consent on Wix
Publish the site first, then test on the connected domain in a new private window, because a Custom Code entry does not run in the Editor preview. Pick a tool with an on-accept vendor tag for step 4, because a Google template loads its tag before any answer.
- Close every private window, open your connected domain in a new one, open the Chrome DevTools Network tab, filter for
termsfeedtag, and reload.plugin.jsand 2settings.jsonrequests return status 200, and the consent banner shows. - Select the second
settings.jsonrequest and open its Preview tab. Theserviceablefield readstrue. - Select the Console tab. No line holds
[ee]or[ww]. - Type the host of a vendor you moved in the Network filter, such as
hotjar.com, and reload. No request appears before you answer. - Click I Agree. Requests to that host appear with no page reload.
- Type
events.pushin the Network filter. The last request, sent at your click, has status 201. - Click the floating button or your link. The Privacy Preferences Center opens.
Test the refusal next. Close every private window, open a new one with the Network tab filtered on the same host, load the Wix site, and click I Decline. Open a second page, and no request to that host appears. Run the remaining checks with Verify Your Installation.
Common mistakes with Privacy Consent on Wix
- The entry loads on one page. "Add Code to Pages" set to a single page leaves every other page with no consent banner. Select All pages.
- The entry has a code type other than Essential. The Privacy Consent banner waits for an answer in the Wix consent banner. Set the Code Type tab back to Essential.
- The Wix consent banner still shows. Visitors answer 2 consent banners. Switch off the "Show banner" toggle.
- A Marketing Integration stays connected. Google Analytics 4 or the Meta Pixel runs before consent, next to the vendor that runs it after consent. Disconnect it once the vendor records visits.
- The test runs in the Editor preview. The Network tab of the preview does not list a
plugin.jsrequest. Test the published site on your connected domain.