OneTrust

On this page 7

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.

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.

ComponentRolePractical note
Stub scriptLoads the banner SDK and configurationMust run before marketing tags
Cookie scannerFinds cookies and trackers on the siteResults need human review
Consent categoriesGroup cookies by purposeIdentified by codes such as C0002
Consent cookieStores the visitor’s choice locallyNamed OptanonConsent by default
Geolocation rulesChoose opt-in or opt-out templates by regionBased on IP-derived location
Consent recordsKeep receipts of each decisionSupport accountability under the GDPR
Core components of a OneTrust cookie deployment

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.

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 codeDefault nameTypical contents
C0001Strictly necessarySession, load balancing, security
C0002PerformanceAnalytics and measurement
C0003FunctionalLanguage, chat widgets, preferences
C0004TargetingAdvertising and remarketing
C0005Social mediaShare buttons and embedded feeds
Default OneTrust cookie categories

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 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.

ApproachStrengthMain limitation
OneTrustBroad governance suite and many regional templatesComplex setup and higher cost
Lightweight CMPFast deployment for small sitesFewer integrations and workflows
Open-source bannerFull code control and no license feeNo built-in scanning or records
Custom in-house bannerTailored design and logicCompliance burden falls on the team
How OneTrust differs from alternative approaches

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.

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.

SymptomLikely causeFix
Analytics fires before any clickTag not linked to a categoryApply blocking or tag manager triggers
Reject hidden in second layerTemplate chosen for conversionAdd reject to the first layer
Unknown cookies in the scanNew vendor added without reviewCategorize and republish
Banner reappears on every pageConsent cookie blocked or wrong domainCheck cookie domain settings
Consent ignored by ad vendorsTCF or Consent Mode not passedEnable the relevant integration
Typical errors and how to correct them

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.