TermsFeed Free Cookie Consent has 4 fixed categories, strictly-necessary, functionality, tracking, and targeting, and every script you tag belongs to exactly one of them. Visitors accept or refuse a whole category at once, so the category you pick decides when each script runs. A visitor who turns off tracking stops every analytics script you tagged with tracking from the next page load. Scripts tagged strictly-necessary run on every page load without an answer. In express mode, the default, the other 3 wait for consent unless the page_load_consent_levels option lists them.

Each category matches a tab in the Preferences Center and a purpose in the consent banner text. The tab names are the ones visitors see in English.

Category ID Preferences Center tab What it covers Examples
strictly-necessary Strictly necessary cookies Services the visitor asked for, which your site does not work without Your login session, your shopping cart, the payment script on a checkout page
functionality Functionality cookies Features the visitor uses and choices the site remembers A video player such as YouTube, a scheduler such as Calendly, a remembered language
tracking Tracking cookies Traffic and usage analysis, and performance measurement Google Analytics 4, Microsoft Clarity, HubSpot
targeting Targeting and advertising cookies Advertising based on browsing habits Meta Pixel, Google Ads, the LinkedIn Insight Tag

A script your site needs to work, such as a cart or a login, works untagged too. An untagged script runs for every visitor, even when an ad blocker stops Cookie Consent.

A category covers scripts, not only cookies. A script that stores data in localStorage, or builds a profile from requests alone, takes the category a cookie for the same purpose takes.

How to decide which category a script belongs to

Ask these questions about each script, in order. A script you answer yes for at question 1 goes into strictly-necessary. Otherwise, pick the last category whose question you answer with yes. A script that fits 2 optional categories then waits, by default, for consent to the later one.

  1. Strictly necessary. Does the page fail to deliver what the visitor asked for without the script, such as a login or a checkout?
  2. Functionality. Does the script run a feature the visitor uses on the page, such as a chat or a booking form?
  3. Tracking. Does the script measure visits, clicks, or performance?
  4. Targeting. Does the script show ads, measure ad conversions, or follow the visitor to other sites?

Common tools, from Google Analytics 4 to Calendly, already have a category set in their vendor recipe. Look up the tools you use in Vendor Recipes for Free Cookie Consent.

The exact category IDs to write in your tags

Write the category ID exactly as listed, in lowercase, with the hyphen in strictly-necessary. The comparison is case-sensitive, so Tracking and strictly_necessary never match. A script tagged with an unknown value, such as analytics or marketing, never runs. With debug on, Cookie Consent logs a warning in the console for it.

Copy the opening tag of the category each script belongs to.

<script type="text/plain" data-cookie-consent="strictly-necessary">/* your code */</script>
<script type="text/plain" data-cookie-consent="functionality">/* your code */</script>
<script type="text/plain" data-cookie-consent="tracking">/* your code */</script>
<script type="text/plain" data-cookie-consent="targeting">/* your code */</script>

How the Preferences Center shows the categories

The Preferences Center shows a "Your privacy" tab, one tab per category you use, and a "More information" tab, with a switch in each category tab. The strictly-necessary switch is on and locked, labeled "Always active". The other switches read "Active" or "Inactive". Before the visitor answers, the switches show which categories run on page load, and after an answer they show the saved answer.

The tab names and texts come from the translation of the language in use. No option changes the tab names and texts, so each tab reads the same on every site that loads the hosted script in the same language.

The notice_banner_purposes_levels option lists the categories your site uses, and an optional category left out does not get a switch and never runs its scripts. A site with no advertising scripts leaves out targeting, so the consent banner text and the Preferences Center no longer mention ads. Leaving out strictly-necessary removes it from the consent banner text only, and its tab and its scripts stay. Set the list and read what a missing category means with Hide Cookie Categories and Buttons.

Each optional Cookie Consent category stands for one or more consent signals in Google Consent Mode v2, Microsoft Clarity, the Meta Pixel, the TikTok Pixel, and HubSpot. tracking maps to analytics_storage, and targeting maps to the advertising signals. Copy the full table and the 2 callbacks that send every signal from Map Categories to Vendor Consent Signals.