Configure the Relevance Module's Tracking Cookie Policy

Introduction

Goal

Configure the Relevance Module to allow site visitors to opt in or opt out of tracking.

Background

The Relevance Module 'tracks' site visitors using a cookie and stores data gathered about visitors. The module's Personalization, Experiments, and Trends features make use of those data.

To comply with local legislation (for example, the EU "Cookie Law"), it may be required to allow website visitors to opt-out (or explicitly opt-in) of the kind of tracking performed by the Relevance Module. This behavior can be enabled through configuration and relies on the visitor's preference being stored in a cookie. This page describes the configuration options with examples.

It is up to the delivery tier implementation to render the UI through which the visitor can opt in or opt out, and to set the actual cookie containing the visitor's preference. See Implement Tracking Cookie Consent for an example implementation using a drop-in Javascript solution.

In Bloomreach Experience Manager 12.1 and newer, it is also possible to configure when the tracking cookie expires.

Configuration

The tracking cookie policy is configured through four properties on the node /targeting:targeting:

Name Type Default Description
targeting:consentCookieEnabled Boolean false If false, visitors are always tracked and can't opt out.
targeting:consentCookieName String   The name of the cookie used to control tracking.
targeting:consentCookieValue String   The value the contents of the cookie is compared to.
targeting:consentCookieOptIn Boolean   If true, tracking is allowed only if the cookie is present and its value matches the consentCookieValue.
If false, tracking is allowed unless the cookie is present and its contents match consentCookieValue.

In Bloomreach Experience Manager 12.1 and newer, it is also possible to configure when the tracking cookie expires:

Name Type Default Description

targeting:visitorCookieMaxAge

Long 63072000 Number of seconds until the tracking cookie expires. The default value is equivalent to 2 years.

Please note that the value of any relevance data being collected is severely impacted if the cookie retention is reduced to a short timeframe.

See Visitors, Visits, and Cookies for more cookie configuration options.

Examples

Track all visitors, don't ask for consent:

/targeting:targeting:
  targeting:consentCookieEnabled: false

Ask for consent, allow opt-out:

/targeting:targeting:
  targeting:consentCookieEnabled: true
  targeting:consentCookieOptIn: false
  targeting:consentCookieName: visitortracking
  targeting:consentCookieValue: disallowed

Ask for consent, allow opt-in (see Implement Tracking Cookie Consent for an example delivery tier implementation):

/targeting:targeting:
  targeting:consentCookieEnabled: true
  targeting:consentCookieOptIn: true
  targeting:consentCookieName: visitortracking
  targeting:consentCookieValue: allowed

Use default settings for consent but let the tracking cookie expire after 90 days instead of 2 years:

/targeting:targeting:
  targeting:visitorCookieMaxAge: 7776000
Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?