setConsent Method
The setConsent method is a programming command used within various software development kits (SDKs) and web SDKs to record and update a user's consent choices for data collection and processing. When it is called, it replaces the default consent settings that were in place before the user made a decision. It is one technical building block that helps organizations act on consent, though it does not by itself determine whether the consent collected is legally valid.
setConsent is a method exposed by several SDKs and tag platforms (for example, the Firebase SDK in the context of Google Consent Mode, the Adobe Experience Platform Web SDK, and the Zeotap SDK) that is invoked to update a user's consent state after an application or page has loaded. In Consent Mode implementations, invoking setConsent overrides the previously configured default consent settings, adjusting the behavior of tags and data collection accordingly. In the Adobe Experience Platform Web SDK, the setConsent command updates the user's profile attributes directly in the Profile store as one of its actions. The method operationalizes recorded consent signals within a given vendor's stack; it does not, on its own, establish that consent meets the standards required under the ePrivacy rules governing access to and storage of information on a device, or the GDPR standards for processing any resulting personal data. Whether opt-in (as generally required in the EU and UK) or opt-out (as commonly applied under US state privacy laws such as the CCPA/CPRA) governs, and whether the surrounding consent flow is valid, depend on legal and configuration factors outside the scope of the method itself.
Why it matters
The setConsent method sits at the point where a user's consent decision is translated into technical behavior across an organization's data stack. Whether an analytics or advertising tag fires, whether data collection proceeds, and how a vendor SDK behaves after a user makes a choice can all depend on this method being called correctly. Because it overrides the default consent settings that were in place before the user decided, a misconfigured or missing setConsent call can mean that tags continue to behave according to defaults rather than the user's actual preferences, creating a gap between what a consent banner appears to promise and what the underlying systems actually do.
For privacy and compliance teams, the significance of setConsent lies in this gap between recording a choice and honoring it. The method operationalizes a consent signal within a given vendor's environment, but it does not by itself establish that the consent collected is legally valid. Valid consent under the GDPR must generally be freely given, specific, informed, and unambiguous, and in most EU and UK contexts the ePrivacy rules require prior consent before non-essential information is stored on or accessed from a user's device. Under US state frameworks such as the CCPA and CPRA, an opt-out model commonly applies instead. The setConsent method does not determine which of these standards governs, nor whether the surrounding consent flow satisfies them.
Because of this, treating setConsent as a compliance control in itself is a common source of risk. The correctness of the consent choices being passed to the method, the timing of the call relative to when tags load or data is collected, and the legal adequacy of the banner or preference flow that produced the choice all sit outside the method's own behavior and must be verified separately.
Who it's relevant to
Inside setConsent Method
Common questions
Answers to the questions practitioners most commonly ask about setConsent Method.

