...
Functionality
The getConsent
function returns if we have full consent or not from the user, and which consent zone is currently activeis used to notify the caller about the users consent when it is available, independent of the consent region. It provides a simplified consent state which is either full or no consent. If further consent details are required, use the consent region specific functions.
Syntax
function adconsent()
argument name | type | optional | value | description | |
---|---|---|---|---|---|
command | string |
| |||
parameter | - | ✔️ |
| Not used | |
callback | function | ✔️ |
| The callback function that is called with the function call result and whether or not the call was successful. |
...
When fullConsent is true, it means the user has expressed full consent in the consent zone where he’s in. This might mean different things in the different consent zones, i.e., the user has given consent for all purposes, vendors and publisher purposes in GDPR, or the user simply didn’t oppose to the sale of his personal data in CCPA. The exact implications of the full consent given will depend on the applicable regional privacy law - however, the true value means that the user didn’t oppose or restrict the consent in any way.
A false value for the fullConsent means that the user has opposed rejected or restricted the consent in some way. It might be a full opposal or just a partial onerejection.
ConsentData.region
The consent region can have the following values:
...
The function can be called as soon as AdConsent is declared in on the page, which means it can be called right after AdConsent stub is created. The callback will be called once AdConsent resolves consent for the first time.
...