Cookie Consent Terms: 12 Essential Concepts Made Clear cover image
Prateek Zare

Written by Prateek Zare

Software Developer with ML and Data Expertise, 8+ years of experience

Last updated

Cookie Consent Terms: 12 Essential Concepts Made Clear

Cookie consent comes with a vocabulary that sounds interchangeable and is not. Strictly necessary, prior consent, opt in and dark pattern each describe a different part of a compliant banner, and mixing them up is how sites end up with a banner that looks right and fails in practice.

This guide defines twelve cookie consent terms, then shows how they fit together in tables you can use as a reference. It also explains how the Cookie Consent Generator turns each concept into working code. It is general information, not legal advice.

What this guide covers
  1. The twelve cookie consent terms in one place
  2. Cookie categories and what each one needs
  3. How the legal terms fit together
  4. In practice: blocking scripts
  5. How the generator turns each concept into code
  6. A worked example for a small blog
  7. Banner styles: how much choice is enough?
  8. Dark patterns and why regulators care
  9. Putting the terms to work
Cookie
A small piece of data a website asks the browser to store, used to remember a session, a setting or a visitor.
First party cookie
A cookie set by the site the visitor is on. It is usually used for logins, carts and language.
Third party cookie
A cookie set by another domain whose content is embedded in the page, such as an advertising or analytics provider.
Strictly necessary cookie
A cookie without which the service the visitor asked for cannot work, such as a session cookie or a security token. It needs no consent.
Consent
Under GDPR Article 4(11), any freely given, specific, informed and unambiguous indication of wishes, by a statement or a clear affirmative action.
Prior consent
Consent obtained before the cookie is stored. A script that sets a cookie while the banner is still open has already broken this rule.
Opt in
A model where nothing optional happens until the visitor agrees. This is what European law expects for analytics and marketing cookies.
Opt out
A model where tracking runs by default and the visitor must switch it off. It does not give valid consent in the EU.
Cookie category
A group of cookies with one purpose, such as necessary, functional, analytics or marketing, so visitors can choose by purpose.
Dark pattern
A design that steers a visitor toward accepting, for example a bright Accept button beside a faint link to manage preferences.
Consent record
Proof of the visitor choice. Article 7(1) requires the controller to be able to demonstrate that consent was given.
Withdrawal
The visitor right to change their mind. Article 7(3) says it must be as easy to withdraw consent as to give it.

Cookie consent attaches to the purpose of a cookie, not to its name. That is why banners are organised by category. Here is how the four usual categories behave.

The four cookie categories
CategoryTypical examplesConsent needed before it runs?Can the visitor switch it off?
Strictly necessarySession ID, login state, security token, saved consent choiceNoNo, and it should not be offered as a choice
FunctionalLanguage, region, saved display preferencesYes in the generated bannerYes
AnalyticsAggregate visit counts, page views, scroll depthYesYes
MarketingAdvertising, retargeting, cross site profilesYesYes

The exception for strictly necessary cookies comes from Article 5(3) of the ePrivacy Directive. It lets a site store information that is essential to deliver a service the visitor asked for. A cookie that merely helps you measure traffic does not qualify, however useful it is to you.

Where each idea comes from
RuleSourceWhat it means for a banner
Storing or reading data on a device needs consent, with an exception for what is strictly necessaryePrivacy Directive, Article 5(3)Analytics and marketing cookies wait for a yes
Consent must be freely given, specific, informed and unambiguousGDPR, Article 4(11)No bundling of purposes, no vague wording
The controller must be able to prove consentGDPR, Article 7(1)Store the choice and keep a record
Withdrawing must be as easy as giving consentGDPR, Article 7(3)A visible way to reopen the banner
Pre ticked boxes and silence are not consentGDPR Recital 32, CJEU Planet49 ruling of 1 October 2019Optional categories start switched off

The Planet49 case is the one to remember. The Court of Justice of the EU ruled that a pre ticked checkbox cannot produce valid consent to cookies, because consent requires active behaviour from the user. The point extends to any banner that treats scrolling or closing the window as agreement.

Prior consent is where cookie consent banners most often fail. The banner appears, but the analytics script already ran in the page head, and the cookie exists before anyone clicked. The cure is to hold such scripts back until the category is granted.

The generated code does this with a plain marker. A script tagged as text/plain with a category name does not execute. The banner script releases it only after the matching choice is saved.

A script held back until analytics is allowed

<script type="text/plain" data-cookie-category="analytics">
  // your analytics loader goes here
</script>
A site loads its analytics script in the page head, then shows a banner. The visitor has not clicked anything. Which cookie consent concept has been broken?

Prior consent means cookies are set only after the choice is made. If the script runs while the banner is still open, the cookie exists before any agreement.

Concept and implementation
ConceptWhat the generated banner does
Consent recordSaves the decision in localStorage under the key cc_consent_v1
Prior consentChecks for a stored decision on page load and shows the banner only if none exists
Strictly necessaryAlways included and cannot be switched off
Reject as easy as acceptAccept All and Reject All are the same size in the Standard and Full styles
Category choiceThe Full style adds Customize with separate boxes for Analytics, Marketing and Preferences
WithdrawalExposes window.cookieConsent with get and reset, so a footer link can reopen the banner
Telling other scriptsFires a cookieConsentUpdated event that your tags can listen for

Set your colours, text and cookie consent categories, preview the banner, and copy ready to paste code that stores the choice and holds scripts back.

Open the Cookie Consent Generator

Take a blog that sets four things: a login session, a saved language, an analytics script and an ad network tag. Sorting them shows how cookie consent works in practice, and which items the banner must hold back.

Sorting four items on a small blog
ItemCategoryRuns before a choice?After Reject All
Login sessionStrictly necessaryYesStill runs
Saved languageFunctionalNoStays off, and the site falls back to the default
Analytics scriptAnalyticsNoStays off
Ad network tagMarketingNoStays off

One of four items runs before the visitor chooses. Three wait. If your own audit finds that all four run on page load, your cookie consent setup is only decoration, and the fix is to mark the three optional scripts so they stay inactive until their category is granted.

The three cookie consent styles compared
StyleButtonsGranularityWhen it fits
SimpleAccept All onlyNoneOnly a site that uses strictly necessary cookies
StandardAccept All, Reject AllBinaryA site with one tracking purpose
FullAccept All, Reject All, Customize, Save PreferencesAnalytics, Marketing and PreferencesMost sites that run analytics and ads
The Simple style is legally thin

A banner with Accept and no equal way to refuse does not meet the requirement that consent be freely given. Use it only when the site sets nothing beyond strictly necessary cookies.

A dark pattern is a design choice that nudges people away from the answer they would otherwise give. The classic example is a large Accept button and a small grey Manage link. In January 2022 the French regulator CNIL fined Google 150 million euros in total and Facebook 60 million euros, partly because refusing cookies took more steps than accepting them.

Patterns regulators object to

  • Accept is prominent, refusal is hidden
  • Refusal takes several clicks
  • Pre ticked optional categories
  • Banner returns on every page after a choice
  • Closing the window counts as agreement

Patterns that hold up better

  • Equal size Accept and Reject buttons
  • Optional categories start off
  • The choice is stored and respected
  • A footer link to change the choice
  • Plain wording about each purpose

Infringements of the cookie consent conditions can reach fines of up to 20 million euros or 4 percent of worldwide annual turnover under Article 83(5) of the GDPR, whichever is higher. Most small sites will never see a number like that, but the rules are the same for everyone.

Putting the terms to work

Cookie consent audit

To audit cookie consent, see which cookies your site is actually setting by opening your browser developer tools. Server responses also show cookies in their headers, which the HTTP header checker can display for any address.

The short answerValid cookie consent is freely given, specific, informed and unambiguous, it is collected before non essential cookies are set, and refusing is as easy as accepting. Strictly necessary cookies are the one group that needs no consent.
Do all cookies need cookie consent?

No. Strictly necessary cookies, such as session and security cookies, need none. Analytics, marketing and most preference cookies need consent before they are set.

What is the difference between opt in and opt out?

Opt in means nothing optional happens until the visitor agrees. Opt out means tracking starts by default, which does not count as valid consent in the EU.

Is a Reject All button required for cookie consent?

Refusing must be as easy as accepting. A Reject All button next to Accept All is the simplest way to meet that.

Where is the cookie consent choice stored?

The generated banner stores it in the browser localStorage under the key cc_consent_v1, and checks it on each page load.

Can I show the banner again later?

Yes. The generated code exposes a reset function, so a Cookie Settings link in the footer can clear the saved choice and reopen the banner.

Does a cookie banner make my site compliant on its own?

No. It only handles consent. You also need a privacy policy, a record of what each script does, and scripts that actually wait for consent.

Sources: GDPR Article 7, Conditions for consent · Planet49 case, Wikipedia