OneTrust: impact on page speed
Category: Consent management
OneTrust provides the consent banner and preference centre and controls which categories of scripts may run. It loads early and on every page.
On 19 % of the 4108 homepages measured, OneTrust is among the five heaviest third parties. Where it is, it takes a median of 119 ms of main-thread time; on the heaviest quarter of those sites it takes 165 ms or more.
19 %
of homepages: among the five heaviest third parties
119 ms
median main-thread time
165 ms
main-thread time on the heaviest quarter (p75)
227 KB
median transfer size
Distribution across homepages
Percentiles across 768 homepages with OneTrust.
| Percentile | Main-thread time | Transfer size |
|---|---|---|
| p25 |
86 ms
|
203 KB |
| Median |
119 ms
|
227 KB |
| p75 |
165 ms
|
270 KB |
| p90 |
251 ms
|
374 KB |
In context
By median main-thread time, OneTrust ranks 29th of 65 third parties in the benchmark, lighter than Adobe Tag Manager and heavier than Hubspot.
On 10 % of the homepages where it appears, OneTrust alone uses 250 milliseconds of main-thread time or more, the mark from which Lighthouse flags third-party code.
Homepages with OneTrust weigh 4.1 MB at the median (JavaScript: 1.7 MB), homepages without it 4.4 MB (JavaScript: 1.6 MB).
Often loaded together with
Share of homepages with OneTrust where the other tool is also among the five heaviest third parties.
- Google Tag Manager 64 %
- Adobe Tag Manager 15 %
- Facebook 13 %
How to spot OneTrust on your page
The stub otSDKStub.js and the banner SDK otBannerSdk.js load from cdn.cookielaw.org together with a JSON configuration for each domain, language files, styles and images; Lighthouse lists them under the product's former name "Optanon". Large organisations often manage many domains in one OneTrust account, and the published configuration can carry categories and languages that a given site never uses. Trimming that configuration reduces both download size and processing on every first visit.
How to reduce the impact of OneTrust
- Remove unused categories, languages and templates from the published configuration.
- Include the banner script only once.
- Check whether the banner becomes the Largest Contentful Paint element on mobile.
Frequently asked questions
How can I load OneTrust with less impact?
Remove unused categories, languages and templates from the published configuration. Include the banner script only once.
Does OneTrust affect Core Web Vitals?
OneTrust is common on large sites in markets with consent rules, and its cost depends on the configuration. The banner script loads early and applies the consent categories in the browser, which adds main-thread work that INP picks up when visitors click accept. A banner placed in the page flow instead of as an overlay shifts the layout, and a slow banner can hold back the LCP element.
Method and sample: Third-Party Benchmark.