Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a flag to disable creation of new session when consent is revoked #521

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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