OneTrust cookie consent testIs it really blocking?
OneTrust holds back what it's told to hold back, in the regions its rules cover. A missing auto-blocking script, a cookie in the wrong category or a lenient geolocation rule, and tracking loads anyway. A real browser checks your site before any click, after Accept All and after Reject All.
Free · about two minutes · recognises OneTrust automatically
Where OneTrust setups leakAnd how to close each gap
- 1
Auto-blocking not installed, or in the wrong place
OneTrust's automatic blocking runs from a separate script, OtAutoBlock.js, that must be the first item in <head>, loaded synchronously and added to the page directly — not through a tag manager. Missing or placed later, nothing is blocked automatically.
Fix: Add OtAutoBlock.js as the first script in <head>, followed by the OneTrust SDK stub.
<script src="https://cdn.cookielaw.org/consent/YOUR-DOMAIN-ID/OtAutoBlock.js"></script> <script src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js" data-domain-script="YOUR-DOMAIN-ID"></script> - 2
Scripts without a category
Scripts that auto-blocking doesn't recognise, inline scripts and iframes written into the page need their category by hand. Left as they are, they run before consent.
Fix: Turn each script off until consent and give it the class of its OneTrust category (C0002 performance, C0003 functional, C0004 targeting, C0005 social media). For an iframe, move src to data-src and add the same class.
<script type="text/plain" class="optanon-category-C0002"> /* analytics (C0002 = performance) */ </script> - 3
Cookies in the wrong category
A tracking cookie filed under Strictly Necessary loads for everyone and can't be refused. It happens when cookies found by the OneTrust scan are categorised in bulk.
Fix: Review the categories in OneTrust's cookie list: analytics in Performance, advertising in Targeting, and only what the site can't work without in Strictly Necessary.
- 4
A geolocation rule that's too lenient
OneTrust shows each region the template its geolocation rule assigns. If the rule for the EU, EEA or UK uses a notice-only or implied-consent template, visitors there get tracked before choosing.
Fix: Give the EU, EEA and UK rules an opt-in template, with nothing non-essential active by default.
- 5
No Reject All on the banner
Templates without Reject All send visitors into the preference centre to refuse — harder than accepting, which EU regulators and the ICO object to.
Fix: In the banner template's button settings, switch on Show reject all button, as visible as Accept All.
What the test doesThree visits, like a regulator
Before any click
A clean browser loads your site and leaves the banner alone. Anything non-essential that loads here ran without consent.
After Accept
The test clicks Accept and records every cookie and service that follows — the list your cookie policy has to cover.
After Reject
A second clean browser clicks Reject. Whatever still loads is tracking that ignores the visitor's choice.
Check OneTrust by handWith your browser's developer tools
- 1
Open a private window
Load your site in a private window, from the region you want to test, and leave the banner alone.
- 2
Look at the cookies
DevTools → Application → Cookies. OneTrust's OptanonConsent and OptanonAlertBoxClosed are fine; _ga, _fbp, _gcl_au and similar are not.
- 3
Ask OneTrust what it thinks
In the console, type OnetrustActiveGroups. Before a choice in an opt-in region it should list C0001 (strictly necessary) only.
- 4
Reject All and browse
Click Reject All, reload and open two more pages. Filter the Network tab by google-analytics, facebook and doubleclick: nothing should go out.
- 5
Check the categories
For each cookie still there, look it up in your OneTrust cookie list. A tracker in Strictly Necessary is the cause.
QuestionsAnd short answers
- Is OneTrust GDPR compliant?
- OneTrust can be configured compliantly, but its many options also make non-compliant setups easy: lenient geolocation rules, wrong categories, no Reject All. The test checks what your configuration actually does.
- My OneTrust rules differ by region. Which one does the test see?
- The banner OneTrust shows to the test's own location, like any visitor from there. If your EU, UK and other rules differ, also test each region by hand from inside it — the steps above take ten minutes.
- Does the test need OneTrust access?
- No. It recognises the OneTrust banner on its own, clicks Accept All and — in a second clean browser — Reject All, and records what loads.
- Is the test free?
- Yes. A free scan shows your score and every issue by service and law. A paid report (from €3, one-time) adds the fix for each issue and a cookie policy built from the scan. The free scan checks your homepage; a paid scan can cover up to 100 pages.
Checked against the vendor's documentation on November 27, 2026.
Sources: OneTrust: auto-blocking · OneTrust: client-side cookie management · OneTrust: banner templates
Test your OneTrust setupFree, in about two minutes
Test another consent tool
Choosing between OneTrust and others?