Skip to main content

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.

Privacy

Let's take another example:

We start in the same way as the schema above. 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" cookieVisitor IDvisitor_privacy_modevisitor_privacy_consentProperties / eventsExclusion / AnonymizationComment
optinGUIDoptintrueall
exemptGUIDexemptfalsesomeRequires a specific configuration as explained in our Privacy center
no-storageFinger Printingno-storagefalsesomeBased on a specic processing option you must request from our support center
no-consentno-consentfalsesomeBased 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
optoutoptoutfalsesomeAll events will be excluded and anonymized. More information in our Privacy Center
customyou decideyou decideyou decideyou decideyou 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.

Method:

pa.privacy.setMode(mode)

ParametersTypeDescription
modestringPrivacy Mode
pa.privacy.setMode('optin');
note

If you don't set any Privacy Mode (and none stored), 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:

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 the storage, properties and events.

Storage

You can include one or more storage keys to your current Privacy Mode (in addition to those already included).

Method:

pa.privacy.include.storageKey(key[, modes])

ParametersTypeDescription
keystringPrivacy Mode
modesarrayPrivacy 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

Method:

pa.privacy.include.storageKeys(keysArray[, modes])

ParametersTypeDescription
keysArrayarrayPrivacy Modes
modesarrayPrivacy 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).

Method:

pa.privacy.exclude.storageKey(key[, modes])

ParametersTypeDescription
keystringPrivacy Mode
modesarrayPrivacy modes where you want to exclude the storage key (optional)
pa.privacy.exclude.storageKey('pa_uid'); // Will be excluded in all modes
pa.privacy.exclude.storageKey('pa_uid', ['exempt', 'customMode']); // Will be excluded in selected modes

Method:

pa.privacy.exclude.storageKeys(keysArray[, modes])

ParametersTypeDescription
keysArrayarrayPrivacy Modes
modesarrayPrivacy modes where you want to exclude the storage key (optional)
pa.privacy.exclude.storageKeys(['pa_vid', 'pa_uid']); // Will be excluded in all modes
pa.privacy.exclude.storageKeys(['pa_vid', 'pa_uid'], ['exempt', 'customMode']); // Will be excluded 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).

Method:

pa.privacy.include.property(prop[, modes, events])

ParametersTypeDescription
propstringProperty you want to include
modesarrayPrivacy Modes (optional)
eventsarrayEvents 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

Method:

pa.privacy.include.properties(propsArray[, modes, events])

ParametersTypeDescription
propsArrayarrayProperties you want to include
modesarrayPrivacy Modes (optional)
eventsarrayEvents 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).

Method:

pa.privacy.exclude.property(prop[, modes, events])

ParametersTypeDescription
propstringProperty you want to include
modesarrayPrivacy Modes (optional)
eventsarrayEvents 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

Method:

pa.privacy.exclude.properties(propsArray[, modes, events])

ParametersTypeDescription
propsArrayarrayProperties you want to exclude
modesarrayPrivacy Modes (optional)
eventsarrayEvents 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).

Method:

pa.privacy.include.event(event[, modes])

ParametersTypeDescription
eventstringEvent you want to include
modesarrayPrivacy 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

Method:

pa.privacy.include.events(eventsArray[, modes])

ParametersTypeDescription
eventsArrayarrayEvents you want to include
modesarrayPrivacy 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).

Method:

pa.privacy.exclude.event(event[, modes])

ParametersTypeDescription
eventstringEvent you want to include
modesarrayPrivacy 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

Method:

pa.privacy.exclude.events(eventsArray[, modes, events])

ParametersTypeDescription
eventsArrayarrayEvent you want to exclude
modesarrayPrivacy 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.

Method:

pa.privacy.createMode(modeName, consentValue)

ParametersTypeDescription
modeNamestringPrivacy Mode you will use in your tagging and that will be sent in the "visitor_privacy_mode" property
consentValuebooleanPrivacy 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.