Sets the current site visitor's consent policy regarding allowed cookies and data transfer to 3rd parties, such as for GDPR or CCPA purposes.
You can use the onConsentPolicyChanged()
event to listen for
changes made when a site visitor changes their consent policy with setConsentPolicy()
. Handle
the policy change accordingly in the event handler.
Changes to the consent policy take affect after the page is refreshed.
An object representing the cookies of the site visitor's consent policy.