CMP JavaScript Object
A CMP JavaScript object is a piece of code that a consent management platform (CMP) places on a website so that other scripts on the page can find out whether a user has given or refused consent for cookies and similar technologies. Websites and vendor scripts call this object to check a person's consent choices before, for example, loading analytics or advertising tools. It is a technical building block that helps carry out consent decisions, but it does not by itself determine whether those decisions are legally valid.
In JavaScript, an object is a collection of properties, each an association between a key and a value; a CMP JavaScript object is such an object (or an associated global function) exposed by a consent management platform to communicate consent state and configuration to on-page and in-frame callers. Under the IAB Transparency and Consent Framework (TCF), the API historically surfaced a global function (for example, one named __cmp) that in-frame callers could check for, returning objects describing the CMP's loading status, configuration, and the user's consent for purposes and vendors; individual CMP vendors also publish their own public methods for enabling or retrieving consent for categories, hosts, and vendors. The object mediates the technical execution of consent signals but does not establish the legal validity of consent, which under EU law generally must be freely given, specific, informed, and unambiguous; the specific methods, property names, and behaviors vary by CMP implementation and by TCF version, and are out of scope for this general definition.
Why it matters
The CMP JavaScript object is the practical mechanism by which a website's consent decisions are actually enforced on the page. When a user accepts or refuses cookies through a consent banner, that choice only has an effect if the scripts that load analytics, advertising, or functional tools actually check the consent state before firing. The CMP JavaScript object is what those scripts query. If it is misconfigured, or if vendor scripts do not consult it, tracking technologies can load regardless of the user's stated preference, creating a gap between the consent recorded and the behavior of the site.
Who it's relevant to
Inside CMP JavaScript Object
Common questions
Answers to the questions practitioners most commonly ask about CMP JavaScript Object.

