Enabling track shopping behavior (SQL statements)
You can configure your store to enable a store function that provides shoppers
the ability to consent to having their shopping behavior tracked. The collected behavior data can
then be used to personalize marketing activities, search rules, and segment-based promotions for the
shoppers that provide consent.To provide shoppers the
ability to consent to allow the site to track their shopping behavior, enable the Enable
shoppers to choose whether their shopping behavior is tracked store function.
Procedure
Run the following SQL statements:
insert into emspot (emspot_id, storeent_id, name, description, usagetype, optcounter) values ($consentOpt_espotId, $storeId, 'ConsentOptions', 'ConsentOptions','STOREFEATURE',1);
insert into emspot (emspot_id, storeent_id, name, description, usagetype, optcounter) values ($mkdConset_espotId, $storeId, 'MarketingConsent', 'MarketingConsent','STOREFEATURE',1);
insert into emspot (emspot_id, storeent_id, name, description, usagetype, optcounter) values ($sesson_espotId, $storeId, 'Session', 'Session','STOREFEATURE',1);
insert into emspot (emspot_id, storeent_id, name, description, usagetype, optcounter) values ($permanent_espotId, $storeId, 'Permanent', 'Permanent','STOREFEATURE',1);
Where:
- emspot_id
- The unique ID of the e-Marketing Spot that is used for displaying the consent management content.
- storeent_id
- The store entity ID as defined in the STORE_ID column of the STORE table. Set the value to be
'$storeId'
- name
- Indicates the store function configuration that is being inserted. Insert rows to define the
following configurations:
- ConsentOptions
- Enable store privacy policy page acceptance.
- MarketingConsent
- Enable the functionality for processing shopper behavior tracking consent for marketing purposes.
- Session
- Temporarily remember the customer's privacy policy acceptance for the browser session. When configured, the acceptance of the privacy policy is remembered for only the shopper's current browsing session. The shopper must accept the privacy policy again whenever they revisit the store after they close and reopen the browser.
- Permanent
- Permanently remember the customer's decision using the browser cache. When configured, the acceptance of the privacy policy is remembered until the shopper removes the store cookie from the browser or 30 days elapse from the date that the cookie is created. After the cookie is removed, the shopper must accept the privacy policy again when they next visit the store.
- description
- The description of the e-Marketing Spot, such as its expected use.
- usagetype
- Defines the usage of the e-Marketing Spot. Set the value for each store function configuration
to be
'STOREFEATURE'
. - optcounter
- The optimistic concurrency control counter for the table. Every time there is an update to the
table, the counter is incremented. Set the value for each configuration to be
'1'
insert into dmemspotdef values ($dmsptodefId,$consentOpt_espotId,$storeId,'FeatureEnabled','false',0,1);
insert into dmemspotdef values ($dmsptodefId,$mkdConset_espotId,$storeId,'FeatureEnabled','false',0,1);
insert into dmemspotdef values ($dmsptodefId,$sesson_espotId,$storeId,'FeatureEnabled','false',0,1);
insert into dmemspotdef values ($dmsptodefId,$permanent_espotId,$storeId,'FeatureEnabled','false',0,1);
Where:
- DMEMSPOTDEF_ID
- The unique ID of the E-marketing Spot default content. Set the value to be
'dmsptodefId'
- EMSPOT_ID
- The unique ID of the e-Marketing Spot that is used for displaying the consent management
content. Load data for each of the following e-Marketing Spots:
- $consentOpt-espotId
- The e-Marketing Spot unique id of the
ConsentOptions
store feature. - $mkdconset_espotId
- The e-Marketing Spot unique id of the
MarketingConsent
store feature. - $session_espotId
- The e-Marketing Spot unique id of the
Session
store feature. - $permanent_espot_id
- The e-Marketing Spot unique id of the
Permanent
store feature.
- STOREENT_ID
- The store entity ID as defined in the STORE_ID column of the STORE table. Set the value to be
'$storeId'
- CONTENTTYPE
- The type of content that is to display in the e-Marketing Spot. Set the value for each
configuration to be
'FeatureEnabled'
. - CONTENT
- The unique identifier of the content. Set the value for the configuration to be
'false'
, - SEQUENCE
- The sequence that the content displays within the e-Marketing Spot. If the content is the only
content to display in the e-Marketing Spot, set the value to
'0'
. - OPTCOUNTER
- The optimistic concurrency control counter for the table. Every time there is an update to the
table, the counter is incremented. Set the value for each configuration to be
'1'
.