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

how to stop clarity to collect data. #75

Closed
balu4k opened this issue Dec 16, 2020 · 11 comments
Closed

how to stop clarity to collect data. #75

balu4k opened this issue Dec 16, 2020 · 11 comments

Comments

@balu4k
Copy link

balu4k commented Dec 16, 2020

Is there a public method or a setting that can be set to false to stop collecting the data for clarity. we would need this to enable / disable clarity based on end user cookie consent.

@dwootton
Copy link

Hi @balu4k I believe what you're looking for got merged here: #66.
I don't think it is in any docs right now, but this could point you in the right direction!

@balu4k
Copy link
Author

balu4k commented Dec 17, 2020

Thanks, will take a look at it.

@mmonteiroc
Copy link

Hello !!!!! Any news about that ?

We implemented clarity in our system, in order to be GDPR compatible, if a user rejects cookies after have accepted them, we have to tell clarity to stop creating new cookies / OR / to stop working at all :)

How can we do that without refreshing the instance of our application, so that we dont have a bad UX

Thanks ;)

@SouchetJulie
Copy link

Old question but I'll answer here for anyone that's still looking for clues like I was recently.

Hi @balu4k I believe what you're looking for got merged here: #66. I don't think it is in any docs right now, but this could point you in the right direction!

This answer + some experimentation did help me find a solution. In my experience calling window.clarity('stop') will do the trick, as in, there will be no more POST request to https://a.clarity.ms/collect.

Thanks to @dwootton :)

@teosoph
Copy link

teosoph commented Aug 6, 2022

Old question but I'll answer here for anyone that's still looking for clues like I was recently.

Hi @balu4k I believe what you're looking for got merged here: #66. I don't think it is in any docs right now, but this could point you in the right direction!

This answer + some experimentation did help me find a solution. In my experience calling window.clarity('stop') will do the trick, as in, there will be no more POST request to https://a.clarity.ms/collect.

Thanks to @dwootton :)

How I should use this window.clarity('stop') ??
Please, provide me to stop this fckng POST 204 https://l.clarity.ms/collect

@SouchetJulie
Copy link

Simply execute window.clarity('stop') whenever you want to stop the data collection, such as after your user has clicked on a button to refuse the use of Clarity, or on page load (you'll need to check that window.clarity is defined first, in this case).

You only need to do it once, and there won't be any collect POST request afterwards.

@HemangDholu
Copy link

HemangDholu commented Jan 30, 2024

Hii I am currently implementing clarity consent in my angular project as window.clarity('consent',false) showing me error with clarity is not function so if any one have idea about to remove cookie if user want to stop the data sharing once it accepted the cookie and then stop the cookie using general method implemented by me for disable cookie . So any one have idea what is next method ..
Thank you in advance

@M7m00d
Copy link

M7m00d commented Feb 18, 2024

Hello @SouchetJulie, @dwootton!

I am trying to do something similar here #535, but I had no luck. Any idea what the problem might be?

@nik32
Copy link

nik32 commented Mar 16, 2024

@SouchetJulie don't we need to remove the cookies also (as stated here - https://learn.microsoft.com/en-us/clarity/setup-and-installation/cookie-consent#erase-cookies)? window.clarity('stop') would just stop calling the /collect call but I think we also need to remove the cookies if user rejects cookies (after accepting first)?

PS: unfortunately the window.clarity('consent', false) is not working. It did not remove cookies in my system. If anyone else know any other way to remove cookies... kindly help!

@ender336
Copy link
Contributor

ender336 commented Apr 3, 2024

window.clarity('consent', false) should remove cookies now (as of 0.7.26).

if you want to stop clarity from running, window.clarity('stop') will work as previously mentioned.

@mmonteiroc
Copy link

It in fact does not work. We use that version in our project, and I had to open this bug #567

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

No branches or pull requests

9 participants