Add a free cookie banner that holds the optional scripts you tag until visitors accept
TermsFeed Free Cookie Consent is a free cookie banner script that holds each optional script you tag until the visitor accepts its category. The TermsFeed generator writes the code, 2 script tags, plus any script you add in its optional step, and you paste it before the closing </body> tag. The visitor answers in the consent banner or in the Preferences Center, and Cookie Consent stores the answer in 3 first-party cookies.
Every setting is an option of one JavaScript object in your page, with no dashboard and no account. This manual describes version 4.2.0, which https://www.termsfeed.com/public/cookie-consent/4.2.0/cookie-consent.js serves. Cookie Consent shows the same consent banner to visitors in every country and does not keep a consent log. Check every limit before you start with Limits of Free Cookie Consent: What It Does Not Do.
Try Cookie Consent on your site
Install the code on your site or platform, then run the checks that show it works.
| Page | What you get there |
|---|---|
| Install a Cookie Banner on Any Website | The 4 install steps, and where the code goes on Shopify, WordPress, Wix, Squarespace, Webflow, static sites, and other platforms |
| Check That Your Cookie Banner Works | The checks in a private window that show your tagged optional scripts wait for consent in express mode with the default page_load_consent_levels |
Set up Cookie Consent for a live site
Tag every optional script that sets a cookie, stores data in the browser, or sends data to another company. Then choose your options, and run the go-live checklist before you rely on the consent banner. Scripts you leave untagged run before consent.
| Page | What you get there |
|---|---|
| Block Scripts Until Consent | The tag for inline and external scripts, and the category each script takes |
| Configure Your Cookie Banner | Layouts, colors, languages, the preferences link, storage, subdomains, and reloads |
| Cookie Banner Go-Live Checklist | The final checks on options, scripts, and page elements, ending with a test in a private window |
Build on Cookie Consent as a developer
Look up every option, callback, event, and cookie in the developer pages, and find where the code goes when your site changes routes without a page load.
| Page | What you get there |
|---|---|
| Free Cookie Consent API Reference | The global object, all 24 options, and the tagged script attributes |
| Free Cookie Consent Callbacks and DOM Events | The 7 callbacks and 12 DOM events, the order they run in, and common patterns |
| Single-Page Apps and Frameworks | One run() per page load, page views on route changes, and the setup for React, Next.js, Vue, Nuxt, Angular, SvelteKit, Astro, and Turbo |
| Free Cookie Consent Versions and Upgrades | How to tell which version a site runs and how to move to 4.2.0 |
Fix a Cookie Consent problem
Find your symptom in troubleshooting, or read the short answers to the questions site owners ask most.
| Page | What you get there |
|---|---|
| Fix Cookie Banner Problems | The browser checks to run first, then each problem listed by symptom |
| Free Cookie Consent FAQ and Support | Short answers on compliance, platforms, storage, and wording, and where to get help |
Every section of the Cookie Consent manual
Open the section for the stage of your setup. The sections run from the first install to the fixes for problems that come later.
| Section | What you get there |
|---|---|
| Get Started With Free Cookie Consent | What Cookie Consent does, the 4 categories, the install steps and platform guides, tagging, the checks before going live, guides by scenario, examples, and short answers |
| Configure Your Cookie Banner | Express or implied consent, and how the consent banner looks, speaks, and stores the answer |
| Connect Marketing Tools | The category mapping, Google Consent Mode v2, embeds, and 9 vendor recipes |
| GDPR and Cookie Law Compliance | Which laws ask for a consent banner, the reject button, proof of consent, advertising, and the limits |
| Free Cookie Consent for Developers | The reference pages, single-page apps and frameworks, self-hosting, versions, and A/B testing |
| Fix Cookie Banner Problems | Each problem listed by symptom, with its causes and fixes |