iOS: Data collection modes

Digital Analytics supports three data collection modes:

  • Opt-in - This is the default. All tag data that is sent is collected.
  • Anonymous opt-out - The SDK collects and has access to certain data about the user experience on the tagged site. However, the data is only presented as part of a pool of general, anonymous visitors. You cannot determine that a specific person performed an action.
  • Total opt-out - No tags are captured or sent to Digital Analytics.
    The data collection mode is persisted across the application background processing, application reclaim, application restarts, and application updates. If the application is removed and reinstalled, the value returns to the default (opt-in).

To change modes, explicitly invoke the setOptOut method from the application.

Opt-in code

Set data collection mode to opt-in.

BOOL bSuccess = [DigitalAnalytics setOptOut: @ "opt_in"];

Anonymous opt-in code

Set data collection mode to anonymous opt-in.

BOOL bSuccess = [DigitalAnalytics setOptOut:@"anonymous"];

Opt-oud code

Set data collection mode to opt-out.

BOOL bSuccess = [DigitalAnalytics setOptOut:@"opt_out"];

Get data collection mode

Get the data collection mode of your application.

NSString* mode = [DigitalAnalytics getOptOut];