getOptOut

The getOptOut() method returns the current opt-out flag state.

Syntax

const currentOptOutState = await PiwikProSdk.getOptOut();

Returns

Whether the opt-out flag is set.

  • true if the flag is set
  • false if the flag isn’t set

Type: boolean

Examples

To read the current opt-out flag state:

const currentOptOutState = await PiwikProSdk.getOptOut();

Related methods