Privacy

  • iOS
  • watchOS
  • tvOS
 

Foreword

The Privacy feature allows you to control the type of information collected according to the legal constraints of each editor depending on regions. You can thus adapt your tagging by a precise management of your various parameters of measurement according to their sensitivity, in the respect of the current regulations.

 

Consent mode

For its proper working, the feature is based on a list of different modes of user consent

  • optin: for exhaustive measurement after consent.
  • optout: for restricted measurement with idclient as “OPT-OUT”.
  • no-consent: for a restricted measurement with idclient set to “Consent-No”.
  • exempt: for a hybrid measure with exclusion of data deemed sensitive (subject to the CNIL exemption process).

Each visitor mode lists a series of Tracker parameters to be allowed . It is therefore possible to interact at different levels and keep complete control of the data to be transmitted.

When a visitor mode is activated, it is registered for a configurable duration of 397 days, if the applied rules actually allow this registration.

 

Tagging methods

The plugin provides a series of useful functions in consent management:

 

setVisitorOptOut

setVisitorOptOut()

Enable “optout” mode.

Example

Privacy.setVisitorOptOut()

[Privacy setVisitorOptOut];

 

setVisitorOptIn

setVisitorOptIn()

Enable “optin” mode.

Example

Privacy.setVisitorOptIn()

[Privacy setVisitorOptIn];

 

setVisitorMode

setVisitorMode(visitorMode)
setVisitorMode(visitorMode, duration)

Activate a specific mode for a defined duration (if not, 397 by default)

ParamTypeDescription
visitorModePrivacy.VisitorModeName of visitor mode
durationIntValidity duration of visitor mode (in days)

Example

Privacy.setVisitorMode(Privacy.VisitorMode.exempt)
Privacy.setVisitorMode(Privacy.VisitorMode.Exempt, 397)

[Privacy setVisitorMode:@"exempt"];
[Privacy setVisitorMode:@"exempt" duration:397];

 

getVisitorMode

getVisitorMode() ⇒ Privacy.VisitorMode

Retrieve the current visitor mode.

Example

var visitorMode = Privacy.getVisitorMode()

NSString* mode = [Privacy getVisitorModeString];

 

extendIncludeBuffer

extendIncludeBuffer(keys)
extendIncludeBuffer(visitorMode, keys)

Add buffer parameters to the inclusion list of the current visitor mode, if it is not defined on the call

ParamTypeDescription
visitorModePrivacy.VisitorModeMode for which the buffer will be extended
keysString...Buffer parameters

Example

Privacy.extendIncludeBuffer("an") // buffer parameter "an"
Privacy.extendIncludeBuffer(Privacy.VisitorMode.exempt, keys: "an", "ac") // buffer parameters "an" and "ac" for Exempt mode (even if current mode is different)
Privacy.extendIncludeBuffer("stc_custom1", "stc_custom2") // buffer parameter "stc", keys "custom1" and "custom2"
Privacy.extendIncludeBuffer("stc_custom*") // buffer parameter "stc", keys start with "custom"

[Privacy extendIncludeBuffer:[NSArray arrayWithObjects:@"an", nil]]; // buffer parameter "an"
[Privacy extendIncludeBuffer:@"exempt" keys:[NSArray arrayWithObjects:@"an", @"ac", nil]]; // buffer parameters "an" and "ac" for Exempt mode (even if current mode is different)
[Privacy extendIncludeBuffer:[NSArray arrayWithObjects:@"stc_custom1", @"stc_custom2", nil]]; // buffer parameter "stc", keys "custom1" and "custom2"
[Privacy extendIncludeBuffer:[NSArray arrayWithObjects:@"stc_custom*", nil]]; // buffer parameter "stc", keys start with "custom"

 

Use cases

 

Activating the CNIL hybride mode

The activation of the hybrid mode exempt allows very limited measurement by the Tracker. Only the “absolutely necessary” parameters are allowed and tracked. See the list of authorized parameters (by default) :

["s", "vm", "vc", "mh", "idclient", "p", "olt", "vtag", "ptag", "ts", "click", "type", "cn", "dg", "apvr", "mfmd", "model", "manufacturer", "os", "stc_crash_*"]

[NSArray arrayWithObjects:@"s", @"vm", @"vc", @"mh", @"idclient", @"p", @"olt", @"vtag", @"ptag", @"ts", @"click", @"type", @"cn", @"dg", @"apvr", @"mfmd", @"model", @"manufacturer", @"os", @"stc_crash*", nil];

Of course, the parameter inclusion list can be extended if necessary. For example, it is possible to add a site custom variable to this list if it is considered that the data is strictly necessary, using the extendIncludeBuffer() method.

Example

Privacy.extendIncludeBuffer(Privacy.VisitorMode.exempt, keys: "x1") // The site indicator "x1" is added to the inclusion list

[Privacy extendIncludeBuffer:@"exempt" keys:[NSArray arrayWithObjects:@"x1", nil]];

 

Activating the “Opt-out” mode

Activating the optout mode results in a strictly limited action by the Tracker. See the list of authorized parameters (default):

["s", "vm", "vc", "mh", "idclient", "ts", "olt", "cn", "click", "type"]

[NSArray arrayWithObjects:@"s", @"vm", @"vc", @"mh", @"idclient", @"ts", @"olt", @"cn", @"click", @"type", nil];

The customer ID then takes the value “OPT-OUT” and the traffic generated is found in the category of traffic excluded at the analysis level.

Example

Example

Privacy.setVisitorOptOut()

[Privacy setVisitorOptOut];

By default, the hits generated when the Opt-out mode is activated are sent. You can if you wish block these sendings by overloading the Tracker configuration variable sendHitWhenOptOut.

Example

var tracker = ATInternet.sharedInstance.defaultTracker
tracker.setSendHitWhenOptOutEnabled(false, sync: true, completionHandler: nil) // true by default

Tracker* tracker = [[ATInternet sharedInstance] defaultTracker];
[tracker setSendHitWhenOptOutEnabled:NO sync:YES completionHandler:nil];

 

Activating the “No-consent” mode

Activating the no-consent mode results in a strictly limited action by the Tracker. See the list of authorized parameters (default):

Example

["s", "vm", "vc", "mh", "idclient", "ts", "olt", "cn", "click", "type"]

[NSArray arrayWithObjects:@"s", @"vm", @"vc", @"mh", @"idclient", @"ts", @"olt", @"cn", @"click", @"type", nil];

The customer ID then takes the value “Consent-NO” and the generated traffic can be excluded at the analysis level.

Example

Privacy.setVisitorMode(Privacy.VisitorMode.noConsent)

[Privacy setVisitorMode:@"noConsent"];

 

Activating the “Opt-in” mode

The activation of the optin mode results in an exhaustive measurement by the Tracker. All parameters are then stored and sent. This method has to be called after an Internet user has given his consent.

Example

Privacy.setVisitorOptIn()

[Privacy setVisitorOptIn];

 

ACPM (OJD) case

If your site/app is certified with the french ACPM (OJD), you have to add stc_device to your include buffer:

Privacy.extendIncludeBuffer("stc_device")

[Privacy extendIncludeBuffer:[NSArray arrayWithObjects:@"stc_device", nil]];

Last update: 05/02/2021