Cookie Consent shows a cookie banner and holds the optional scripts you tag, and it leaves location rules, consent records, cookie scanning, and advertising frameworks to you. Check the limits of version 4.2.0 before you choose Cookie Consent for a site with obligations beyond a consent banner.

A free consent banner script suits a site whose scripts you control and tag in your own templates. A site that needs regional consent banners, a consent log without an endpoint you build, or vendor changes without a deploy needs a hosted consent management platform (CMP).

Cookie Consent asks every visitor for consent, stores the answer in the browser, and by default holds each optional script you tag until the visitor accepts its category. These parts work as soon as the code is on your pages.

  • Consent banner. A consent banner and a Preferences Center appear in 36 languages, with the "I agree", "I decline", and "Change my preferences" buttons on the first layer in express mode.
  • Express consent. Before the visitor answers, untagged scripts and scripts tagged strictly-necessary run, plus any optional category you list in page_load_consent_levels.
  • Categories. The optional categories functionality, tracking, and targeting each have a switch in the Preferences Center when you use them, and strictly-necessary has a locked switch labeled "Always active".
  • Script holding. Cookie Consent reads every <script type="text/plain" data-cookie-consent="..."> in the page when run() starts, inline or with src, and holds each optional one until its category is allowed.
  • Stored answer. 3 first-party cookies keep the answer for 365 days by default.
  • Callbacks and events. 7 callbacks and 12 DOM events let your own code send consent signals or keep a record.

Every option has a default, so a site works with few settings changed. Find the whole list of options, callbacks, and events in the API reference.

Cookie Consent applies one consent banner to every visitor and does not keep a record outside the browser. Match each limit to a legal obligation of your site, and use the workaround where the obligation applies.

Limit What you see on your site Workaround or alternative
No location detection Every visitor sees the consent banner, wherever they are Keep express consent for everyone, which asks first in every region. A site that must show the consent banner by region needs a hosted CMP
No consent log on a server The answer lives only in 3 cookies in the browser Send each answer to your server from the user_consent_saved callback. Set it up with proof of consent
No IAB TCF or GPP string Google AdSense does not serve personalized ads in the EEA, the UK, and Switzerland, and TCF ad networks do not find any consent Choose how to show Google ads with Google AdSense and the IAB TCF
No Global Privacy Control or Do Not Track A visitor who sends either browser signal sees the same consent banner, and Cookie Consent reads neither signal No setting in Cookie Consent. A US site that must honor Global Privacy Control needs another tool for it
No Do Not Sell or Share link Visitors under US state laws do not get an opt-out link from Cookie Consent Add the link and its handling outside Cookie Consent. Read which laws ask for it in do I need a cookie consent banner
No new question after a configuration change Visitors who answered are not asked again when you change any option other than demo, and a category you add later reads false for them until they open the Preferences Center and accept it Ask every visitor again with How to force every visitor to answer again
No consent shared across separate domains example.com and example.org each ask the visitor Share one answer across subdomains of a single domain with share across subdomains

Cookie Consent holds only the classic <script> elements you tag before it starts, and it does not remove cookies that other scripts set. These limits decide how much tagging and code your site needs.

Limit What you see on your site Workaround or alternative
No blocking of untagged scripts A script without type="text/plain" and data-cookie-consent runs before consent Tag every optional script that sets a cookie, stores data in the browser, or sends data to another company, with the steps to tag your scripts
No blocking of iframes, images, or pixels A YouTube embed, another iframe, or a tracking pixel image loads at once Replace the embed with a placeholder that a tagged script fills. Build it with embeds and iframes
No ES module scripts A module script you tag runs as a classic script and fails on import Tag the classic build of the library, where the vendor offers one
No scripts added after run() A tagged script that a route or a tag manager adds later never runs Load such code from a callback with the pattern for single-page applications
No cookie deletion Cookies a vendor set stay after the visitor declines or withdraws Delete the first-party cookies of each vendor from a callback with the patterns in Rejecting Does Not Delete Cookies Already Set. Cookies on other domains stay
No stop for scripts that already ran Tagged scripts that already ran keep running on the current page after a category is turned off Reload the page after each answer with reload after consent. A Google Consent Mode update from user_consent_saved sends denied at once
No consent signals of its own Google, Microsoft, Meta, TikTok, and HubSpot tags do not receive consent updates from Cookie Consent Set the Google Consent Mode denied default as the first script in the <head> of every page, after only the charset meta and above the Google tag, the Google Tag Manager container, and the Cookie Consent block. Put the Meta and TikTok defaults inside their pixel code. Send the Google Consent Mode update from user_consent_saved with user_consent_saved_on_page_load: true, and grant the other signals from scripts_specific_loaded with callbacks_force: true. Copy the mapping from category mapping
No cookie scanner No list of the cookies each category sets List the cookies yourself from the Application tab of Chrome DevTools. Run the checks in verify your installation
No WordPress Consent API WordPress plugins that wait for that API do not see any consent Tag the scripts the plugins print instead, with the steps to install on WordPress

Cookie Consent takes its settings from a JavaScript object in your page and ships fixed texts in 36 languages. The look and the wording change only as far as these limits allow.

Limit What you see on your site Workaround or alternative
No text options The wording of the consent banner and the Preferences Center is fixed for each language Set a text of the consent banner with the short script in Change the Cookie Banner Text With Free Cookie Consent
No custom categories Only the 4 categories exist, with their fixed names and texts Put each script into the closest of the 4 cookie categories
No remembered menu language A language picked in the Preferences Center menu applies to the current page only Set the language option on each page of a multilingual site with the language settings
No dashboard Every change is an edit to the cookieconsent.run({...}) call in your template Change the options with configure your consent banner
One Cookie Consent per page A second run() call keeps the first consent banner, and the options of the second call are ignored Call run() once on each page, and once in the host page of single-page applications
No option removes the credits line "Cookie Consent by TermsFeed" stays in the Preferences Center footer Change the color or size of the line with colors and custom CSS