Journal · CMP guides
Which consent category does each third party script belong in?
Assign by purpose, not by vendor. Strictly necessary if the site cannot deliver what the visitor asked for without it, functional if it remembers a preference they set, analytics if it measures behaviour, marketing if it targets or attributes advertising. When a script serves two purposes, take the stricter of the two, which is the later one in that order.
Why does the category follow the purpose, not the product?
Every consent tool hands you the same four or five boxes and asks you to sort your tags into them. The vendor documentation tells you what each cookie stores and for how long. Nothing joins the two, which is why so many estates end up putting everything in analytics and moving on.
That single habit produces both failure modes at once. Consent gets collected for things that never needed it, so the banner asks for more than it has to. Meanwhile advertising tools sit in a category people said yes to for a completely different reason, which is the assignment that actually carries risk.
The way out is to stop thinking in products. One vendor can occupy several categories at the same time. A tag that keeps a session alive, measures a funnel and builds a remarketing audience is doing three jobs, and the category follows the job rather than the logo on the script.
Two things are worth fixing in place first. The category names are a convention, so your consent tool's labels will not match anyone else's exactly. The requirement underneath them is not: in the EU, anything outside the strictly necessary exemption in Article 5(3) of the ePrivacy Directive needs an opt in before it runs, whatever box you filed it in. The EDPB’s Guidelines 2/2023 confirm it covers pixels and local storage too, not only cookies. The UK follows the same rule, with new exceptions since 5 February 2026. Schedule A1 of PECR exempts storage used only for statistics that improve your site, or only to adapt or enhance how it looks and works. Both still need clear information and a free, simple way to object, and statistics data may go only to whoever helps make those improvements. The ordering matters too, because necessary, functional, analytics and marketing run from least to most restrictive.
How do you decide which category a script goes in?
Write the purpose in one sentence
Name what the script does and who benefits. If the sentence needs the word and, you have more than one purpose and probably more than one category.
Test the strictly necessary claim first
Ask whether the visitor would lose something they explicitly asked for if this did not run, not whether the business would lose something. Login sessions, baskets, checkout security and the consent record itself pass. Very little else does.
Separate remembering from measuring
Functional covers a preference the visitor set, such as language, currency or the fact they dismissed a notice. The moment that same store is read to build a report, it has become analytics.
Ask whether the data reaches an advertising ecosystem
If the vendor can match the visitor to an advertising profile or attribute a conversion to a campaign, it belongs in marketing however the vendor describes it. Attribution is advertising: a Google Ads conversion tag is a marketing tag even though the number it produces looks like a measurement.
When two purposes apply, take the stricter category
A tag that measures a funnel and builds a remarketing audience is a marketing tag. The strictest applicable category is the only assignment that survives a question without an argument, and it is where you would end up anyway.
Which scripts do not sort themselves?
The purpose decides, not the product category.
| Script | Deciding question | Category |
|---|---|---|
| Fraud prevention, bot blocking | Who does it protect? | Necessary only inside a payment |
| A/B testing, personalisation | Did the visitor ask for it? | Consent, analytics at minimum |
| Error monitoring, performance | Does it store an identifier? | Necessary only when it stores none |
| Session recording, heatmaps | Is it measuring behaviour? | Consent, always |
Fraud prevention and bot blocking is the genuinely contested one. A risk check running inside a payment the visitor is submitting has a real exemption argument, because removing it breaks what they came to do. The Article 29 Working Party’s opinion on the consent exemption treats security cookies for a service the user asked for, such as spotting repeated failed logins, as exempt. A tool that scores all arriving traffic to protect an advertising budget does not, because the beneficiary is the business. Where the argument is still open, gate it and keep the reasoning written down.
A/B testing and personalisation almost always need consent. Splitting traffic means storing which variant somebody saw, and the purpose is optimising the business rather than delivering what was requested. If your consent tool offers a personalisation category, use it; if it does not, file them under analytics at minimum, under marketing when the results feed advertising, and never under functional.
Whichever category you choose, confirm that your banner updates the matching signal. Tags gated on functionality_storage can stay blocked even after someone accepts when it does not.
Error monitoring and performance carry the strongest non obvious exemption case, and it usually still fails. Reporting a stack trace so the site keeps working is defensible. Attaching a persistent identifier so one person can be followed across sessions is measurement wearing a reliability label, and that is the deciding detail.
Session recording and heatmaps are not ambiguous in law, only in habit. They record what a visitor did on the page. That is analytics at best, and because of what a recording can capture it deserves a clearer mention to visitors than a line in a table.
What does a wrong category cost in each direction?
Over gating is the cheaper mistake. Put a genuinely necessary tool in analytics and it stops for everyone who declines, which costs you measurement and sometimes function. The measurement side of a wrong assignment, including what it does to the Consent Mode signals Google receives, is in what a wrong consent category does to GA4 and Google Ads. One case deserves naming: the record of the consent choice itself must never sit behind consent, or the banner cannot remember the choice and asks again on every page.
Under gating is the expensive one. Put a marketing tool in necessary or functional and it runs for people who explicitly refused. That is the defect enforcement has actually pursued, and unlike most compliance questions it is visible from outside your organisation in a single page load, by anyone who cares to look. We wrote up the most common version of it in why the Facebook pixel still loads when your tags are blocked.
The asymmetry is the whole reason to take the stricter category while a case is unresolved. Over gating is a cost you can measure and reverse in an afternoon. Under gating is a disclosure, and the exposure runs backwards over every visitor since the tag went in. For where that exposure actually comes from, what regulators actually sanction is the companion piece.
How do you check the assignment actually holds?
Your consent tool's category list shows what you declared. It does not show what the page does.
Check it the short way. Open the site in a clean profile, refuse everything, reload, and read the cookies, the local storage and the browser's resource timing entries. Anything from a refused category that is still present is either in the wrong box or not gated at all, and the consent tool's own reporting cannot tell you which. Repeat after any release that adds a tag, because this regresses quietly.
Getting the categories right is most of what a consent layer is for, which is why Velo ships the category mapping and the blocking as one thing rather than leaving you to reconcile a panel against a page.
Common questions
What consent category should a script go in?
The one that matches what the script does for the visitor, not the one the vendor suggests. Strictly necessary covers scripts without which the visitor cannot get what they explicitly asked for, such as a login session, a basket, checkout security and the consent record itself. Functional covers remembering a preference they set. Analytics covers measuring behaviour. Marketing covers targeting or attributing advertising. Where a single script serves two purposes, assign it to the stricter of the two categories, because that is the only assignment you can defend without an argument.
Which consent category does Google Analytics go in?
Analytics. In the EU it needs consent in almost every setup. Anonymising addresses, shortening retention or disabling advertising features are all worth doing, but none of them turns measurement into a service the visitor asked for. Since February 2026 UK law exempts analytics used only to improve your own site. Visitors must get clear information and a free way to object, and the data may go only to whoever helps make those improvements. We read GA4 as outside that exemption whenever its data also serves advertising or Google’s own products, so in most setups it stays gated there too.
Is A/B testing analytics or marketing?
Analytics at minimum, and marketing if the results feed advertising or profiling. Splitting traffic requires storing which variant a visitor saw, and the purpose is optimising the business rather than delivering something the visitor requested, so it does not reach the strictly necessary exemption. If your consent tool offers a separate personalisation category, that is the more accurate home for it.
Do error monitoring scripts need consent?
It depends on whether they store an identifier on the device. Capturing an error and reporting it so the site keeps working has a reasonable claim to being necessary. Attaching a persistent identifier so the same person can be followed across sessions does not, because that is measurement wearing a reliability label. Check what the script writes to cookies or local storage rather than what the product page calls it.
What happens if I put a script in the wrong consent category?
The two errors are not equally costly. Assign a genuinely necessary tool to analytics and it stops for everyone who declines, which is a measurement and functionality problem you can quantify and reverse. Assign a marketing tool to necessary or functional and it runs for people who refused, which is the defect regulators actually pursue and which anyone can confirm from outside in a single page load. When a case is genuinely contested, take the stricter category while you resolve it.
Keep reading
Why does a tracking cookie come back after rejection?
You rejected, the cookie vanished, and then it was back. Four causes, which one you have, and how to make a rejection stick.
Does HubSpot need cookie consent?
HubSpot lists its tracking cookies and ad pixels as non essential. How to hold them until a visitor consents, and why gating your Meta and LinkedIn tags can miss them.
Start with a scan
See what your homepage already loads before you install anything. The free scanner reads the page and your public Tag Manager container.
A first pass, not a verdict. Four checks on your homepage, and we open your container.
Free for one site and 1,500 monthly sessions. Pro from €7 a month, plus VAT, for unlimited sites.
Step by step installs for WordPress, Shopify, Webflow, Wix and more.
Free for one site
Banner, scan and consent records for one site, free. Pro from €7 a month, plus VAT, for unlimited sites.