---
schema_version: "1"
id: 2b32fb153b175a0c001dd4427aedf99a60b7d4f9b6ef1fd812369b781419ba7c
title: "Consent Management: Track Shopper Consent in B2C Commerce"
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_consent_management.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_consent_management.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 671fa9994c232ecd8e8fbc13ed8cbd998c004b99e6efe7eef80bfcbcfd87eeae
description: Honor and respect your customers’ wishes when they request only specific forms of contact from your company or opt-out of certain types of data-sharing. We provide details to help you determine the best way to comply with the data protection and privacy regulations that apply to your company.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Consent Management: Track Shopper Consent in B2C Commerce

Honor and respect your customers’ wishes when they request only specific forms of contact from your company or opt-out of certain types of data-sharing. We provide details to help you determine the best way to comply with the data protection and privacy regulations that apply to your company.

Track your shoppers’ approval for how your company interacts with them. Data subjects have the right to consent to the use of their personal data and can object to the processing of their personal data with respect to receiving marketing communications, online tracking, and user profiling. To help you assess your compliance with various data protection and privacy regulations, we give you examples of common shopper requests. And we provide details to help you determine the best way to comply with the regulations that apply to your company. For instance, a shopper visits a website and doesn’t want any of their information tracked while visiting the site.

Many data protection and privacy regulations can require you to delete shoppers’ personal data when a shopper requests to receive only specific forms of contact from your company. We’ve listed a few of the regulations that are important to many companies collecting and processing their shoppers’ data.

- General Data Protection Regulation
- Personal Information Protection Act (PIPA), Japan
- Privacy Act, Australia
- Personal Information Protection and Electronic Documents Act (PIPEDA), Canada

If you have shoppers who request specific methods of contact from your company, review these common requests and the procedures related to them.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d85992e55">Product</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d85992e58">Common Shopper Request</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d85992e61">Actions to Consider</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d85992e64">Things to Consider</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Product" class="slds-cell-wrap" style="vertical-align:top;" headers="d85992e55 ">Salesforce B2C Commerce</td>

            <td data-label="Common Shopper Request" class="slds-cell-wrap" style="vertical-align:top;" headers="d85992e58 ">I don't want your site to track my personal information for marketing or
              other purposes.</td>

            <td data-label="Actions to Consider" class="slds-cell-wrap" style="vertical-align:top;" headers="d85992e61 ">
              <div>
                <p>
                  <a href="https://help.salesforce.com/s/articleView?id=cc.b2c_setting_privacy_preferences.htm&amp;release=264.0.0&amp;type=5" title="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 don’t want the merchant to collect their personal information.">Set the Tracking site preference.</a>
                </p>
              </div>
              <p> Programmatically override the site preference using the Script API. </p>
              <p>
                <a href="https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/scriptapi/html/api/class_dw_system_Session.html" target="_blank">Programmatically override the site preference using the Script
                  API.</a>
              </p>
              <p style="margin-bottom:0;">Read about a sample consent tracking implementation in SGJC (SiteGenesis
                JavaScript Controllers).</p>
            </td>

            <td data-label="Things to Consider" class="slds-cell-wrap" style="vertical-align:top;" headers="d85992e64 ">
              <p>Use a new site preference, Tracking, to set default tracking behavior for
                each storefront.</p>
              <p style="margin-bottom:0;">To override this behavior for an individual shopper, call the
                <code>dw.system.Session.isTrackingAllowed()</code> and
                <code>dw.system.Session.setTrackingAllowed(boolean)</code>
                methods.
              </p>
              <p style="margin-bottom:0;">Session cookies are used by default, so you can discuss them
                with your legal team.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Product" class="slds-cell-wrap" style="vertical-align:top;" headers="d85992e55 ">B2C Commerce</td>

            <td data-label="Common Shopper Request" class="slds-cell-wrap" style="vertical-align:top;" headers="d85992e58 ">I don't want your app to track my personal information for marketing or
              other purposes.</td>

            <td data-label="Actions to Consider" class="slds-cell-wrap" style="vertical-align:top;" headers="d85992e61 ">
              <p style="margin-bottom:0;">Determine shopper's tracking preference using the Shop API HTTP/HTTPS
                headers. See the Open Commerce API (OCAPI) Global HTTP Headers topic.</p>
            </td>

            <td data-label="Things to Consider" class="slds-cell-wrap" style="vertical-align:top;" headers="d85992e64 ">Shop API resources let you set the HTTP(s) header DNT, which indicates
              whether personal information is tracked.</td>

          </tr>
          <tr class="">
            <td data-label="Product" class="slds-cell-wrap" style="vertical-align:top;" headers="d85992e55 ">B2C Commerce</td>

            <td data-label="Common Shopper Request" class="slds-cell-wrap" style="vertical-align:top;" headers="d85992e58 ">I want to know which cookies your site uses to store information about
              me.</td>

            <td data-label="Actions to Consider" class="slds-cell-wrap" style="vertical-align:top;" headers="d85992e61 ">
              <p>
                <a href="https://help.salesforce.com/s/articleView?id=cc.b2c_local_data_storage.htm&amp;release=264.0.0&amp;type=5" title="B2C Commerce uses browser cookies and session storage objects to store and track information.">Review the local
                  browser storage topic</a> to understand the usage and lifespan of
                data stored locally.
              </p>
              <p style="margin-bottom:0;">Inform the shopper of those cookies that can be relevant to their
                usage.</p>
            </td>

            <td data-label="Things to Consider" class="slds-cell-wrap" style="vertical-align:top;" headers="d85992e64 ">Many cookies are automatically deleted at the end of each session, but
              some have longer lifespans. A system or browser crash can prevent
              deletion.</td>

          </tr>
        </tbody>
      </table>