Setting consent
Learn how to manage a user's consent
setSelectedConsent()
This method sets a user's consent choice but doesn't save it.
saveConsents()
This method should be called after the user saves their consent preferences, e.g., via an 'Accept all' button or a dialog save. This function handles logic such as calling the backend and the onConsentSet callback.
setConsent()
Useful for buttons like "Enable Marketing Consent", this will save the user's new consent by calling saveConsents().