You are here:
Sitemap Consent Management
Both the Marketing Cloud Personalization and Data 360 Web SDKs provide APIs for managing user consent preferences. Use these examples to update consent status, retrieve current consents, and listen for consent change events in your Data 360 sitemap.
This table highlights default consent behavior differences between Marketing Cloud Personalization and Salesforce Personalization.
Unlike Marketing Cloud Personalization, you can’t rely on implicit op-in behavior for Salesforce Personalization. To ensure that Salesforce Personalization features function as expected, you must explicitly configure consent.
Example: Marketing Cloud Personalization Web SDK Consent Configuration// Updates consents
SalesforceInteractions.updateConsents([
{
purpose: 'Personalization',
provider: 'MyConsentProvider',
status: SalesforceInteractions.ConsentStatus.OptIn
}
]);
// Gets current consents
const consents = SalesforceInteractions.getConsents();
// Listens for consent revocation only
document.addEventListener('interactions:onConsentRevoke', handler);
Example: Data 360 Web SDK Consent Configuration// Updates consents (same API)
SalesforceInteractions.updateConsents([
{
purpose: 'Tracking', // Replaces 'Personalization' used in Marketing Cloud Personalization; Salesforce Personalization commonly uses 'Tracking' for purpose
provider: 'MyConsentProvider',
status: SalesforceInteractions.ConsentStatus.OptIn
}
]);
// Gets current consents
const consents = SalesforceInteractions.getConsents();
// Listens for both consent grant and consent revocation
document.addEventListener('interactions:onConsentGrant', handler); // New setting
document.addEventListener('interactions:onConsentRevoke', handler);

