Set Privacy Preferences

When shoppers visit a Salesforce B2C Commerce storefront, connected systems can collect and process their behavior and personal data to enhance the shopper experience. However, some shoppers might not want the merchant to collect their personal information.

As part of the Salesforce Data Privacy and Protection efforts to keep shoppers’ personal data secure and private, you can configure the default setting for your tracking-related privacy preferences in Business Manager. When a new session is created, the default value is used, unless explicitly changed for that shopper.

Note: The default privacy setting is disabled, with a tracking preference value of true, indicating to not collect data. However, for merchants/sites existing prior to the 18.3 release, the tracking preference is enabled to ensure backward comparability for those who are using tracking-required resources.

Because custom code can read and set this preference, you can change the value for each shopper. For example, if consent is stored permanently within the shopper’s profile, the preference for each session must be updated according to the user’s profile settings each time a shopper logs in and out.

The default value, or the customer-specific value, is passed through the system controlling any of the storefront’s tracking-related actions.

Depending on if and how the shopper is asked for consent to tracking, and how this decision is stored, you can implement your own solution to update tracking consent. You can modify tracking consent in OCAPI by setting HTTP Headers (see the OCAPI HTTP Headers topic). Or, you can use the Session Script API. You can determine the value of the tracking preference by calling the dw.system.Session.isTrackingAllowed() method; you also can set the value of the preference by calling the dw.system.Session.setTrackingAllowed() method.

  1. Navigate to site>Merchant Tools > Site Preferences > Privacy Settings.
  2. Select the customer-tracking default action for new storefront sessions.
    • Disabled―Tracking is disabled by default and can be enabled per session via custom code.
    • Enabled ―Tracking is enabled by default and can be disabled per session via custom code.
  3. Select a Clickstream honors session DNT setting.

    A shoppers session holds a clickstream object which contains the last 50 top-level requests (e.g. pipeline calls) of the shopper. This feature is used in SiteGenesis to figure out the last products that the shopper has visited in order to present some history for convenience. There is a script API to get the clickstream entries from the current session.

    Note:

    This setting is only related to the clickstream API dw.web.Clickstream, and does not control any other Commerce Cloud clickstream functionality.

    • Yes – Clickstream honors the storefront do-not-track (DNT) session status.

      If session DNT=true, no clickstream events will be collected.

      If session DNT=false, clickstream events will be collected.

    • No – Clickstream events are collected regardless of the sessions DNT status.

  4. Click Apply.