Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This function returns the US Privacy consent string from the CMP. In other words, it retrieves user consent for CCPA users. It is part of the US Privacy User Signal Mechanism “USP API”.

Syntax

function __uspapi()

...

More information about getUSPData can be found in the official IAB specification.

Scope

The function can be called at any time, but the response will change depending on when it is called.

...

This example validates the CCPA Reference Code to check the user's consent. The code "1---" is considered as CCPA does not apply.

...