Reputation: 11
Has anyone worked with enabling/disabling tracking consent with sitecore 10.1
?
I tried the below but it does not seem to work as consentChoice.IsGiven
is always returned as true(even after the revoke code is executed):
: https://doc.sitecore.com/xp/en/developers/101/sitecore-experience-platform/manage-a-contact-s-tracking-consent-choices.html
Also, when I set explicitConsentForTrackingIsRequired
to true
for my site the tracking code starts giving an error.
Upvotes: 1
Views: 438
Reputation: 1
Regarding
You may need to test this better with either incognito(if using chrome also ensure no shared incognitos) or ensure to force hard refresh (clear cookies) before testing this.
In addition to these I had also faced errors using this in conjunction with sitecore forms:
When using forms along with explicitConsentForTrackingIsRequired
there is an issue where forms auto starts tracking on interaction with form elements , forms has a missing condition check for User Consent before starting tracking.
Please check the answer here for workaround if it is the case.
Upvotes: 0