OneTrust is a commercial privacy, security and data governance platform whose best-known component is a consent management platform (CMP) that shows consent banners, records user choices and controls which cookies and tags may run. In the field of cookies & consent, the name usually refers to this cookie consent module and its JavaScript banner, which many large websites deploy to meet the ePrivacy Directive, the GDPR and similar laws.
The company was founded in 2016 in Atlanta, Georgia, and grew quickly as organizations prepared for the GDPR. Its platform covers far more than cookies, including data mapping, assessments and vendor risk, but its consent tooling is the part that ordinary web users see every day.
How the OneTrust consent banner works
The OneTrust consent module works by loading a script before other tags, presenting a banner, and then releasing or blocking scripts according to the stored choice. The site owner configures the banner, categories and rules in a web console, and the platform publishes a domain-specific script that is embedded in the page head.
A cookie scanner crawls the site periodically, detects cookies and their domains, and suggests a category for each one. Administrators review the results, assign cookies to consent categories, and publish a new version of the configuration. The published script then reads the visitor’s location, selects the matching geolocation rule and displays the appropriate template.
The following table lists the main technical components and what each one does in a typical deployment.
| Component | Role | Practical note |
|---|---|---|
| Stub script | Loads the banner SDK and configuration | Must run before marketing tags |
| Cookie scanner | Finds cookies and trackers on the site | Results need human review |
| Consent categories | Group cookies by purpose | Identified by codes such as C0002 |
| Consent cookie | Stores the visitor’s choice locally | Named OptanonConsent by default |
| Geolocation rules | Choose opt-in or opt-out templates by region | Based on IP-derived location |
| Consent records | Keep receipts of each decision | Support accountability under the GDPR |
Once a choice is made, the script writes the OptanonConsent cookie with the accepted category codes and a timestamp, and typically sets OptanonAlertBoxClosed to record that the banner was dismissed. Page code and the tag manager can read the list of active groups to decide whether a tag may fire.
Consent categories and blocking methods
OneTrust organizes cookies into purpose-based categories, and the default set mirrors the classic division used in European cookie guidance. Only the strictly necessary category is active without consent in an opt-in model; the others stay off until the visitor agrees.
| Category code | Default name | Typical contents |
|---|---|---|
| C0001 | Strictly necessary | Session, load balancing, security |
| C0002 | Performance | Analytics and measurement |
| C0003 | Functional | Language, chat widgets, preferences |
| C0004 | Targeting | Advertising and remarketing |
| C0005 | Social media | Share buttons and embedded feeds |
Enforcement can happen in several ways. Manual tagging changes the script type of each third-party tag so it runs only when its category is active. Auto-blocking intercepts known scripts automatically, which is faster to deploy but depends on the vendor’s library of recognized domains. A third approach uses tag manager triggers that read the active groups, and Google Consent Mode signals can be passed so Google tags adjust their behavior.
For advertising, the CMP can act as a registered IAB TCF CMP, producing a TC string that tells participating vendors which purposes and vendors the visitor approved. It can also honor Global Privacy Control signals, which matter under California law.
OneTrust compared with other consent tools
OneTrust belongs to the enterprise segment of consent tools, so its main distinction is breadth and configurability rather than ease of setup. Smaller CMPs such as Cookiebot target simpler sites with automated scanning and fixed templates, while self-built banners give full control but no audit trail.
| Approach | Strength | Main limitation |
|---|---|---|
| OneTrust | Broad governance suite and many regional templates | Complex setup and higher cost |
| Lightweight CMP | Fast deployment for small sites | Fewer integrations and workflows |
| Open-source banner | Full code control and no license fee | No built-in scanning or records |
| Custom in-house banner | Tailored design and logic | Compliance burden falls on the team |
The choice of tool does not by itself create compliance. Regulators assess the actual behavior of the banner, so a OneTrust deployment can be lawful or unlawful depending on configuration.
Configuring OneTrust for valid consent
A compliant configuration starts from the legal model for each region and then aligns design, blocking and records with it. In the European Economic Area, the opt-in consent model applies to non-essential cookies, so nothing beyond strictly necessary cookies may load before a clear affirmative action.
- Place a Reject all button on the first layer with the same prominence as Accept all.
- Leave all optional categories unchecked by default in the preference center.
- Test that no marketing requests leave the browser before consent, using developer tools.
- Rescan the site after each release and recategorize new cookies before publishing.
- Set a reasonable consent lifetime, often 6 to 12 months, and request consent again afterward.
- Provide a persistent link so visitors can withdraw consent as easily as they gave it.
Outside Europe, the platform supports opt-out templates for laws such as the CCPA as amended by the CPRA, where the key control is a link to opt out of sale or sharing rather than prior consent.
Common OneTrust misconfigurations
Most problems found in audits come from configuration gaps, not from the platform itself. Data protection authorities have repeatedly criticized banners that make refusal harder than acceptance, regardless of which CMP produced them.
| Symptom | Likely cause | Fix |
|---|---|---|
| Analytics fires before any click | Tag not linked to a category | Apply blocking or tag manager triggers |
| Reject hidden in second layer | Template chosen for conversion | Add reject to the first layer |
| Unknown cookies in the scan | New vendor added without review | Categorize and republish |
| Banner reappears on every page | Consent cookie blocked or wrong domain | Check cookie domain settings |
| Consent ignored by ad vendors | TCF or Consent Mode not passed | Enable the relevant integration |
Another frequent issue is performance cost: the banner script adds network requests and can delay rendering, so teams should load it early but efficiently. Finally, auto-blocking is not exhaustive, and unrecognized scripts may still run until they are handled manually.
Understanding it simply
OneTrust is a tool that many websites use to ask visitors about cookies. When a page shows a box asking whether you accept analytics or advertising cookies, that box is often run by OneTrust behind the scenes.
Think of it as a doorkeeper for website trackers. It keeps optional trackers outside until you say yes, remembers your answer, and keeps a record so the company can show what you agreed to. The tool only works well if the website sets it up correctly.
Applied in practice
An online retailer selling to customers in Germany, France and California deploys OneTrust to replace an old notice that simply said cookies were in use. The privacy team runs the scanner, which finds about 140 cookies from analytics, advertising and chat vendors, and assigns each to a category.
The team configures an opt-in banner for the European Economic Area with equal Accept all and Reject all buttons, and an opt-out link for California that also honors Global Privacy Control. Advertising tags in the tag manager are linked to the targeting category, and Google Consent Mode is enabled.
Testing shows that no advertising calls leave the browser before consent in Europe. The measured consent rate drops compared with the old notice, but the retailer gains auditable consent records and a configuration that withstands a regulator’s inspection.