Privacy
Our Privacy methods allow you to control the data collected within the audience measurement solution, according to the different legislations to which you refer.
It offers you the possibility to adapt your tagging thanks to a precise management of the different measurement parameters (events and properties sent, trackers used, …), in the respect of the regulation in force.
We encourage you to first consult our Privacy Center in order to set up the appropriate tagging. Don't hesitate to involve your legal team and/or you DPO in the process.
caution
If you want to use the ePrivacy exemption collection (or Hybrid measurement), please refer to our documentation.
Some legal steps are required.
Key notions
A Privacy Mode is a Privacy state where you can manage different options :
- The cookies (or storage for mobile) you want to set
- The events / properties you want to send
- The value your "visitor_privacy_mode" and "visitor_privacy_consent" properties will take
Basically, we can say that a Privacy Mode refers to a specific purpose.
Let's take an exemple:
When a visitor lands to your page, you have not yet collected its consent. So you do not want to set cookies, and only collect anonymized data.
So you will use a specific Privacy Mode to achieve this behavior: no-consent
.
Then, when the visitor consents, you will want to start dropping a visitor cookie, and send all the information contained in your tagging.
To do this you will use another specific Privacy Mode: optin
.
Finally, the visitor could also have consented to a purpose other than opt-in. In that case, you can create a Privacy Mode that fits to your Privacy needs.
I can create an advertising
mode I will use to set Users cookies, and send some advertising information.
Thanks to the "visitor_privacy_mode" and "visitor_privacy_consent", you will be able to respect a perfect data governance by applying dedicated treatments depending on the mode the data has been collected.
Default Privacy Modes
Privacy Mode | "pa_vid" cookie | Visitor ID | visitor_privacy_mode | visitor_privacy_consent | Properties / events | Exclusion / Anonymization | Comment |
---|---|---|---|---|---|---|---|
optin | ✅ | GUID | optin | true | all | ❌ | |
exempt | ✅ | GUID | exempt | false | some | ❌ | Requires a specific configuration as explained in our Privacy center |
no-storage | ❌ | Finger Printing | no-storage | false | some | ❌ | Based on a specic processing option you must request from our support center |
no-consent | ❌ | ❌ | no-consent | false | some | ✅ | Based on a specic processing option you must request from our support center. All events will be excluded and anonymized. More information in our Privacy Center |
optout | ✅ | ❌ | optout | false | some | ✅ | All events will be excluded and anonymized. More information in our Privacy Center |
custom | you decide | you decide | you decide | you decide | you decide (same base as exempt mode) | ❌ | Some cookies, properties and events are included by default to a custom mode |
tip
Each mode has by default its own rules.
You can check which storage keys (cookies), properties and events are included by default in the dedicated article.
You can also find the list of our cookies and storage keys in the Cookies & storage article.
Set a Privacy Mode
You don't have to modify your event tagging depending on a specific consent.
The Privacy Mode will be in charge of sending the right information, depending on what you have configured.
It will be stored in a pa_privacy
cookie, and will be used on all events until it is modified, or until the cookie is deleted.
- Javascript
Method:
pa.privacy.setMode(mode)
Parameters | Type | Description |
---|---|---|
mode | string | Privacy Mode |
pa.privacy.setMode('optin');
note
If you don't set any Privacy Mode, the value set for configuration privacyDefaultMode
will be applied by default.
Get a Privacy Mode
If you want to know the current mode used by the SDK, you can use the following method:
- Javascript
Method:
pa.privacy.getMode()
pa.privacy.getMode(); // Return a string with the Privacy Mode value
Manage a Privacy Mode
You can manage your Privacy Modes by controlling three elements :
Storage
You can include one or more storage keys to your current Privacy Mode (in addition to those already included).
- Javascript
Method:
pa.privacy.include.storageKey(key[, modes])
Parameters | Type | Description |
---|---|---|
key | string | Privacy Mode |
modes | array | Privacy modes where you want to include the storage key (optional) |
pa.privacy.include.storageKey('pa_vid'); // Will be included in all modes
pa.privacy.include.storageKey('pa_uid', ['exempt', 'customMode']); // Will be included in selected modes
- Javascript
Method:
pa.privacy.include.storageKeys(keysArray[, modes])
Parameters | Type | Description |
---|---|---|
keysArray | array | Privacy Modes |
modes | array | Privacy modes where you want to include the storage key (optional) |
pa.privacy.include.storageKeys(['pa_vid', 'pa_uid']); // Will be included in all modes
pa.privacy.include.storageKeys(['pa_vid', 'pa_uid'], ['exempt', 'customMode']); // Will be included in selected modes
You can exclude one or more storage keys to your current Privacy Mode (in addition to those already exluded).
- Javascript
Method:
pa.privacy.exclude.storageKey(key[, modes])
Parameters | Type | Description |
---|---|---|
key | string | Privacy Mode |
modes | array | Privacy modes where you want to exclude the storage key (optional) |
pa.privacy.exclude.storageKey('pa_uid'); // Will be included in all modes
pa.privacy.exclude.storageKey('pa_uid', ['exempt', 'customMode']); // Will be included in selected modes
- Javascript
Method:
pa.privacy.exclude.storageKeys(keysArray[, modes])
Parameters | Type | Description |
---|---|---|
keysArray | array | Privacy Modes |
modes | array | Privacy modes where you want to exclude the storage key (optional) |
pa.privacy.exclude.storageKeys(['pa_vid', 'pa_uid']); // Will be included in all modes
pa.privacy.exclude.storageKeys(['pa_vid', 'pa_uid'], ['exempt', 'customMode']); // Will be included in selected modes
Properties
You can include one or more properties to the following events you will send for your current Privacy Mode (in addition to those already included).
- Javascript
Method:
pa.privacy.include.property(prop[, modes, events])
Parameters | Type | Description |
---|---|---|
prop | string | Property you want to include |
modes | array | Privacy Modes (optional) |
events | array | Events on which the properties will be included (optional) |
pa.privacy.include.property('article_category'); // Will be included in all modes
pa.privacy.include.property('article_category', ['exempt','customMode']); // Will be included in selected modes
pa.privacy.include.property('article_category', null, ['page.display','click.*']); // Will be included for all modes, but only selected events
- Javascript
Method:
pa.privacy.include.properties(propsArray[, modes, events])
Parameters | Type | Description |
---|---|---|
propsArray | array | Properties you want to include |
modes | array | Privacy Modes (optional) |
events | array | Events on which the properties will be included (optional) |
pa.privacy.include.properties(['article_category','article_date']); // Will be included in all modes
pa.privacy.include.properties(['article_category','article_date'], ['exempt','customMode']); // Will be included in selected modes
pa.privacy.include.properties(['article_category','article_date'], null, ['page.display','click.*']); // Will be included for all modes, but only selected events
You can exclude one or more properties to the following events you will send for your current Privacy Mode (in addition to those already exluded).
- Javascript
Method:
pa.privacy.exclude.property(prop[, modes, events])
Parameters | Type | Description |
---|---|---|
prop | string | Property you want to include |
modes | array | Privacy Modes (optional) |
events | array | Events on which the properties will be excluded (optional) |
pa.privacy.exclude.property('article_category'); // Will be excluded in all modes
pa.privacy.exclude.property('article_category', ['exempt','customMode']); // Will be excluded in selected modes
pa.privacy.exclude.property('article_category', null, ['page.display','click.*']); // Will be excluded for all modes, but only selected events
- Javascript
Method:
pa.privacy.exclude.properties(propsArray[, modes, events])
Parameters | Type | Description |
---|---|---|
propsArray | array | Properties you want to exclude |
modes | array | Privacy Modes (optional) |
events | array | Events on which the properties will be excluded (optional) |
pa.privacy.exclude.properties(['article_category','article_date']); // Will be excluded in all modes
pa.privacy.exclude.properties(['article_category','article_date'], ['exempt','customMode']); // Will be excluded in selected modes
pa.privacy.exclude.properties(['article_category','article_date'], null, ['page.display','click.*']); // Will be excluded for all modes, but only selected events
Events
You can include one or more events that can be sent for your current Privacy Mode (in addition to those already included).
- Javascript
Method:
pa.privacy.include.event(event[, modes])
Parameters | Type | Description |
---|---|---|
event | string | Event you want to include |
modes | array | Privacy Modes (optional) |
pa.privacy.include.event('selfpromotion.impression'); // Will be included in all modes
pa.privacy.include.event('selfpromotion.impression', ['exempt','customMode']); // Will be included in selected modes
- Javascript
Method:
pa.privacy.include.events(eventsArray[, modes])
Parameters | Type | Description |
---|---|---|
eventsArray | array | Events you want to include |
modes | array | Privacy Modes (optional) |
pa.privacy.include.events(['selfpromotion.display','selfpromotion.click']); // Will be included in all modes
pa.privacy.include.events(['selfpromotion.display','selfpromotion.click'], ['exempt','customMode']); // Will be included in selected modes
You can excluded one or more events that can be sent for your current Privacy Mode (in addition to those already excluded).
- Javascript
Method:
pa.privacy.exclude.event(event[, modes])
Parameters | Type | Description |
---|---|---|
event | string | Event you want to include |
modes | array | Privacy Modes (optional) |
pa.privacy.exclude.event('selfpromotion.display'); // Will be excluded in all modes
pa.privacy.exclude.event('selfpromotion.display', ['exempt','customMode']); // Will be excluded in selected modes
- Javascript
Method:
pa.privacy.exclude.events(eventsArray[, modes, events])
Parameters | Type | Description |
---|---|---|
eventsArray | array | Event you want to exclude |
modes | array | Privacy Modes (optional) |
pa.privacy.exclude.events(['selfpromotion.display','selfpromotion.click']); // Will be excluded in all modes
pa.privacy.exclude.events(['selfpromotion.display','selfpromotion.click'], ['exempt','customMode']); // Will be excluded in selected modes
Custom Privacy Modes
If our default Privacy Modes do not meet your expectations, you can create your own modes.
- Javascript
Method:
pa.privacy.createMode(modeName, consentValue)
Parameters | Type | Description |
---|---|---|
modeName | string | Privacy Mode you will use in your tagging and that will be sent in the "visitor_privacy_mode" property |
consentValue | boolean | Privacy consent that will be sent in the "visitor_privacy_consent" property |
pa.privacy.createMode('customMode', true); // Create my mode
pa.privacy.include.properties(['my_property', 'my_second_property'], 'customMode') // Properties will be included in the mode I've created
or
pa.privacy.include.property(['*'], 'customMode') // All properties will be included in the mode I've created
pa.privacy.setMode('customMode'); // Set my mode
note
"visitor_privacy_consent" can be used in Explorer or Data Query if you want to filter on users that have given consent or not.
We also use it in Data Flow to filter your stream, and Stream Inspector to filter your sessions.