Skip to main content
Level 2
Oct 29, 2026 7:38 PM UTC
Question

Disable Adobe Web SDK thirdPartyCookiesEnabled with setConsent

We’re currently facing an issue where we need to continue collecting user data while disabling third-party cookies for users who opt out. However, Adobe Web SDK’s thirdPartyCookiesEnabled setting can only be configured before Alloy is initialized. 

Although the Web SDK provides a setConsent command when using defaultConsent“pending” that allows us to update consent for data collection, it does not allow us to change the third-party cookie setting after initialization. As a result, setting collect to "y" can still trigger a Demdex request that retrieves the user’s CORE ID from Adobe Audience Manager, even when the user has opted out of third-party cookies. I’d like to be able to pass another flag to disable third party cookies with the setConsent command. Otherwise, we would need to wait for consent before alloy initialization, which defeats the purpose of the defaultConsent: “pending” flag. 

2 replies

sarav_prakash
Community Advisor
Community Advisor
Nov 1, 2026 11:28 PM UTC

Hi ​@SethHe ,

You’re right. setConsent cannot change thirdPartyCookiesEnabled after init. The 

collect: { val: "y" } permits collection; it does not independently disable Audience Manager identity calls

Can you try like this 

await alloy("configure", {
datastreamId: "XXX",
orgId: "XXX@AdobeOrg",
defaultConsent: "pending",
thirdPartyCookiesEnabled: false
});

// Only when collection is permitted by the visitor's preferences:
await alloy("setConsent", {
consent: [{
standard: "Adobe",
version: "2.0",
value: {
collect: { val: "y" }
}
}]
});

This will initialize with 3rd party cookies disabled, but keeps collection consent pending. But subsequent users who opt-in will also get impacted, 3rd party identification remains disabled for all users. 

If you need to vary per visitor, would be a custom implementation, like 

  • Read an existing CMP preference before configure.
  • For an unresolved preference, either default to false or defer configuration.
  • To change the setting after initialization, persist the preference and do a page reload, configuring the new instance accordingly. Do not reconfigure the existing instance.

This usecase sounds a valid Adobe feature request -  support changing third-party identity usage independently of collection consent, with opt-out applied before queued events are released or new identity requests are issued. This is a very gud SDK enhancement. 

Translate
SethHeAuthor
Level 2
Nov 5, 2026 1:52 PM UTC

Hi, 

Thanks for the advice. When I disabled the thirdPartyCookiesEnabled flag and then enabled it after the user accepted consent, it still did not send the Demdex request after a page reload. It seems that once a consent choice has been made, the setting is not re-evaluated on subsequent page loads. The Demdex request only fires after I clear the Adobe cookies and reload the page.

I’ll be disabling it for now since I can’t find benefit to having it with our current setup. Is there anyway for me to track updates to the web SDK for the future? 

Thanks

Translate