Configure the Relevance Module's Tracking Cookie Policy
Overview
This page explains how to configure the Relevance Module in Bloomreach Content to support visitor consent for tracking. You can allow visitors to opt in or opt out of tracking, and control how the tracking cookie behaves.
When to Use
Configure the tracking cookie policy to comply with privacy regulations, such as the EU "Cookie Law", or to provide visitors with control over tracking by the Relevance Module.
Prerequisites
- Access to the
/targeting:targetingnode in the JCR repository. - Familiarity with visitor tracking cookies.
- Implementation of a UI in the delivery tier to collect visitor consent and set the consent cookie. See Implement Tracking Cookie Consent for an example.
Configuration Options
The Relevance Module uses a cookie to track visitors and collect data for Personalization, Experiments, and Trends features. You can configure the tracking cookie policy using the following properties on the /targeting:targeting node:
| Name | Type | Default | Description |
|---|---|---|---|
targeting:consentCookieEnabled | Boolean | false | If false, all visitors are tracked and cannot opt out. |
targeting:consentCookieName | String | Name of the cookie that controls tracking. | |
targeting:consentCookieValue | String | Value to compare against the cookie's contents. | |
targeting:consentCookieOptIn | Boolean | If true, tracking is allowed only if the cookie exists and its value matches consentCookieValue. If false, tracking is allowed unless the cookie exists and its value matches consentCookieValue. |
For brXM 12.1 and later, you can also configure the tracking cookie's expiration:
| Name | Type | Default | Description |
|---|---|---|---|
targeting:visitorCookieMaxAge | Long | 63072000 | Number of seconds until the tracking cookie expires. The default is 2 years. |
Important: Reducing the cookie retention period may limit the usefulness of collected relevance data.
For additional cookie configuration options, see Visitors, Visits, and Cookies.
Example Configurations
Track all visitors without asking for consent:
/targeting:targeting: targeting:consentCookieEnabled: false
Allow visitors to opt out of tracking (opt-out model):
/targeting:targeting: targeting:consentCookieEnabled: true targeting:consentCookieOptIn: false targeting:consentCookieName: visitortracking targeting:consentCookieValue: disallowed
Allow visitors to opt in to tracking (opt-in model):
/targeting:targeting: targeting:consentCookieEnabled: true targeting:consentCookieOptIn: true targeting:consentCookieName: visitortracking targeting:consentCookieValue: allowed
Change the tracking cookie expiration to 90 days (instead of the default 2 years):
/targeting:targeting: targeting:visitorCookieMaxAge: 7776000
Verification
After updating the configuration:
- Test the visitor experience to confirm that tracking behavior matches the configured policy.
- Verify that the consent cookie is set and read according to your implementation.
- Confirm that the tracking cookie expires as configured.