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 can decide that they do not want the merchant to collect their personal information.
In Business Manager, you can configure the default setting for your tracking-related privacy preferences. When a new session is created, the default value is used, unless explicitly changed for a shopper.
Because custom code can read and set this preference, you can change the value for each shopper. For example, consent can be stored permanently within the shopperβs profile. In this case, the preference for each session must be updated according to the userβs profile settings when the 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.
Sometimes you can implement your own
solution to update tracking consent. How you implement your solution
depends on whether the shopper is asked for consent to tracking, and how
this decision is stored. 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.