OneTrust: “A tag read consent state before a default was set”

Posted by: Veronica Pamintuan Date Posted: November 21, 2025
Back to Case Studies

Issue

Issue: “A tag read consent state before a default was set” (Sample Error)

Reason? This error is all about script order! Basically, there’s no

Solution

  • Reason? This error is all about script order! Basically, there’s no default consent set before any tags are loaded.
  • Solution: To resolve this issue, ensure that your consent defaults are defined before any Google Tags or OneTrust scripts are loaded. The correct order of scripts should be as follows:
    • Define consent defaults –
      • The best way to do this is through the OneTrust setting dashboard or Google Tag Manager.
    • Place the OneTrust script in Google Tag Manager either by:
      • Using the OneTrust Editor Template like this.
      • or adding it via cHTML + Trigger: All Pages (this script)
    • Deploy the OneTrust CDN.

Achievement

Best Practices:

  • IMPORTANT: If OneTrust will be fully managed in GTM, make sure this OneTrust script is added in GTM, not in the back-end code.

Snippet/Screenshot/Link

Best Client Reference: