Skip to content

Conversation

@boblat
Copy link

@boblat boblat commented Jan 9, 2024

Why?

  • to stop data collection and clear cookies in the browser when the user revokes consent which is previously granted
  • Consent Revoked API #491 accepted a boolean parameter in call to window.clarity('consent') to indicate whether the user accepted or revoked consent
  • if false is passed as the parameter, i.e. window.clarity('consent', false), the existing cookies are cleared in the browser and the data collection stops.
  • however, a new session is started after 250ms and the new cookies are created and the data collection resumed.

How?

  • by introducing the second boolean parameter, a new session creation can be prevented
  • calling window.clarity('consent', false, false) will clear the browser cookies and stop the data collection, and will not start a new session inline with the user's intention of revoking consent.

@boblat
Copy link
Author

boblat commented Jan 9, 2024

@microsoft-github-policy-service agree company="MakerX"

@vxgilsonbueno
Copy link

Any idea when this feature will be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants