Step-by-Step Use Case
In this example, we will walk through common loops and sequences when working with different vendor consent settings in the Consent JavaScript SDK.
Vendor Settings in This Scenario
myAnalyticsService Consent setting: No Consent Mode
myMarketingService Consent setting: Essential Mode
Sequence of Events
Page load initiated – A pageview is requested to be tracked.
js\n_jts.push({ track: "pageview" });\n_jts.push({ track: "submit" });\n
myAnalyticsService: true
myMarketingService: undefined
(default consent status)
Analytics Pageview-Tags: Executed without restrictions (justification does not require consent). Marketing Tags: Not executed (no explicit consent or denial provided yet).
Alternative A: User interacts with the CMP banner and consents to all tools.
–
myAnalyticsService: true
myMarketingService: true
Analytics Pageview-Tags: Not re-executed (consent setting unchanged). Marketing Pageview-Tags: Executed without restrictions (reprocessed commands, consent changed from “undefined” → “true”).
Alternative B: User interacts with the CMP banner and denies consent to all tools.
–
myAnalyticsService: true
myMarketingService: ncm
Analytics Pageview-Tags: Not re-executed (consent setting unchanged). Marketing Pageview-Tags: Executed with restrictions (Privacy Mode Configuration; reprocessed commands, consent changed from “undefined” → “ncm”).
Key Takeaways
No Consent Mode (
myAnalyticsService
) runs without waiting for user consent.Essential Mode (
myMarketingService
) adapts behavior based on consent status:true
→ Full trackingncm
→ Restricted tracking (privacy mode)
Reprocessing ensures that events held in memory can be executed with the updated consent context.
Last updated
Was this helpful?