microsoft / clarity

A behavioral analytics library that uses dom mutations and user interactions to generate aggregated insights.
https://clarity.microsoft.com
MIT License
2.13k stars 213 forks source link

How remove consent to clarity #211

Open StefanoTesla opened 2 years ago

StefanoTesla commented 2 years ago

Hello everyone, I'm working to adjust my cookie policy, and I found a problem.

When user accepts cookies, window.clarity('consent'); is fired, but if I change cookie setting, what I have to do for stop clarity cookie??? just deliting the cookie?

blimpage commented 2 years ago

+1, this would be a very useful feature. I'm working on a site that uses Cookiebot to manage consent, which allows users to adjust their consent preferences at any time. However once window.clarity('consent') has been called a single time, there seems to be no way to revoke consent.

Edit: Adding a bit more detail to explain why I think this is important. When a user changes their consent preferences and indicates that they no longer consent to tracking cookies, ideally my website should respond by deleting all existing cookies, and ceasing to read/write any cookies.

From my application's JavaScript code I'm able to delete any cookies that Clarity has set on my website's domain, but the Clarity JavaScript library will recreate these cookies after I've deleted them. I'm completely unable to delete any cookies set on the clarity.ms domain, since those are third-party cookies from the point of view of my application's JavaScript code.

Without the ability to inform the Clarity library that cookie consent has been revoked and that cookies should no longer be read/written, I'm not able to ensure that the user's preferences are being respected.

ClaritySupport commented 2 years ago

@StefanoTesla , We will consider this as feature request and add it to our product roadmap.

StefanoTesla commented 2 years ago

We Will......it should be already done at the beginning

uruk-hai-21 commented 1 year ago

Nothing?

ClaritySupport commented 1 year ago

@StefanoTesla , Deleting cookies is the only support we have at this point. Will consider this feedback.

nik32 commented 7 months ago

@ClaritySupport this is serious! If we don't delete the cookie after user rejecting the consent... then it is a violation of GDPR... and can result in serious action against us!

Even though there is a method called window.clarity('consent', false) (mentioned in your docs here)... it is not working. It did not remove cookies in my system. So kindly help 🙏!

ClaritySupport commented 7 months ago

Hi,

We are checking with our engineering team and will update you.

Thanks,

Clarity Support Team

Visit our docs!: https://docs.microsoft.com/en-us/clarity

@.**@.>

[cid:8f6629c0-b25f-4ad7-b119-e4ec6362ccab]

Confidentiality note: This e-mail, and any attachment to it, contains privileged and confidential information intended only for the use of the individual(s) or entity named in the e-mail. If the reader of the e-mail is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that reading it is strictly prohibited. If you have received this e-mail in error, please immediately return it to the sender and delete it from your system.


From: nik32 @.> Sent: Saturday, March 16, 2024 1:58 AM To: microsoft/clarity @.> Cc: Microsoft Clarity Support @.>; Mention @.> Subject: Re: [microsoft/clarity] How remove consent to clarity (Issue #211)

@ClaritySupporthttps://github.com/ClaritySupport this is serious! If we don't delete the cookie after user rejecting the consent... then it is a violation of GDPR... and can result in serious action against us!

Even though there is a method called window.clarity('consent', false) (mention in your docs herehttps://learn.microsoft.com/en-us/clarity/setup-and-installation/cookie-consent#erase-cookies)... it is not working. It did not remove cookies in my system. So kindly help 🙏!

— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/clarity/issues/211#issuecomment-2001918102, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AW5BXQZFX273TVSIRWDUGJ3YYQCSZAVCNFSM5MSBD2DKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBQGE4TCOBRGAZA. You are receiving this because you were mentioned.Message ID: @.***>

nik32 commented 7 months ago

Hi, We are checking with our engineering team and will update you. Thanks, Clarity Support Team Visit our docs!: https://docs.microsoft.com/en-us/clarity @.**@.> [cid:8f6629c0-b25f-4ad7-b119-e4ec6362ccab] Confidentiality note: This e-mail, and any attachment to it, contains privileged and confidential information intended only for the use of the individual(s) or entity named in the e-mail. If the reader of the e-mail is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that reading it is strictly prohibited. If you have received this e-mail in error, please immediately return it to the sender and delete it from your system. ____ From: nik32 @.> Sent: Saturday, March 16, 2024 1:58 AM To: microsoft/clarity @.> Cc: Microsoft Clarity Support @.>; Mention @.> Subject: Re: [microsoft/clarity] How remove consent to clarity (Issue #211) @ClaritySupporthttps://github.com/ClaritySupport this is serious! If we don't delete the cookie after user rejecting the consent... then it is a violation of GDPR... and can result in serious action against us! Even though there is a method called window.clarity('consent', false) (mention in your docs herehttps://learn.microsoft.com/en-us/clarity/setup-and-installation/cookie-consent#erase-cookies)... it is not working. It did not remove cookies in my system. So kindly help 🙏! — Reply to this email directly, view it on GitHub<#211 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AW5BXQZFX273TVSIRWDUGJ3YYQCSZAVCNFSM5MSBD2DKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBQGE4TCOBRGAZA. You are receiving this because you were mentioned.Message ID: @.***>

@ClaritySupport any update on this

VikasDasamaneni16 commented 7 months ago

@nik32 ,Clarity(‘consent’, false) now is correctly removing cookies.

nik32 commented 7 months ago

https://github.com/microsoft/clarity/assets/51018572/98b0588d-290c-4064-8227-f5a3d0b9865d

@VikasDasamaneni16 and @ClaritySupport it is still not working (as you can see in the above video... I clicked reject but still the clarity cookies were present)

ClaritySupport commented 7 months ago

@nik32 , Are you calling clarity(‘consent’, false) ? If so, can you share website url to debug there.

nik32 commented 7 months ago

@ClaritySupport This is the app link - https://publlish-test.vercel.app/. Its a NextJS App and I am calling window.clarity(‘consent’, false) and window.clarity(‘stop’) on rejection... but the existing cookies are not getting cleared.

ClaritySupport commented 7 months ago

Hi Nik,

Are you calling stop before consent maybe? Our engineering team see the cookies deleted upon the consent false call. If you call clarity('stop') before you've cleared consent, then clarity is no longer running and cannot perform an operation like clearing cookies.

[A screenshot of a computer Description automatically generated]

Thanks, Clarity Support Team Visit our docs!: https://docs.microsoft.com/en-us/clarity @.**@.> @.***

Confidentiality note: This e-mail, and any attachment to it, contains privileged and confidential information intended only for the use of the individual(s) or entity named in the e-mail. If the reader of the e-mail is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that reading it is strictly prohibited. If you have received this e-mail in error, please immediately return it to the sender and delete it from your system.

From: nik32 @.> Sent: Thursday, April 4, 2024 12:29 AM To: microsoft/clarity @.> Cc: Microsoft Clarity Support @.>; Mention @.> Subject: Re: [microsoft/clarity] How remove consent to clarity (Issue #211)

@ClaritySupporthttps://github.com/ClaritySupport This is the app link - https://publlish-test.vercel.app/. Its a NextJS App and I am calling window.clarity('consent', false) and window.clarity('stop', false) on rejection... but the existing cookies are not getting cleared

- Reply to this email directly, view it on GitHubhttps://github.com/microsoft/clarity/issues/211#issuecomment-2036393917, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AW5BXQ64EZ7UNTATOQR7Y33Y3T6KVAVCNFSM5MSBD2DKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBTGYZTSMZZGE3Q. You are receiving this because you were mentioned.Message ID: @.**@.>>

nik32 commented 6 months ago

Hi @ClaritySupport! You were indeed correct (I was calling stop before consent)... but even after making the change... I don't see consent-false working. The cookies were still present. You can have a look at the test site again (I have changed the calling order in the code)

ClaritySupport commented 6 months ago

Hi,

We can still see cookies getting cleared as expected when we call consent(false) directly. Could you please share how do you trigger your consent preferences popup. We can try it with your implementation if we know how to pop that up.

Thanks, Clarity Support Team Visit our docs!: https://docs.microsoft.com/en-us/clarity @.**@.> @.***

Confidentiality note: This e-mail, and any attachment to it, contains privileged and confidential information intended only for the use of the individual(s) or entity named in the e-mail. If the reader of the e-mail is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that reading it is strictly prohibited. If you have received this e-mail in error, please immediately return it to the sender and delete it from your system.

From: nik32 @.> Sent: Sunday, April 7, 2024 10:50 PM To: microsoft/clarity @.> Cc: Microsoft Clarity Support @.>; Mention @.> Subject: Re: [microsoft/clarity] How remove consent to clarity (Issue #211)

Hi @ClaritySupporthttps://github.com/ClaritySupport! You were indeed correct (I was calling stop before consent)... but even after making the change... I don't see consent-false working. The cookies were still present. You can have a look at the test site again (I have changed the calling order in the code)

- Reply to this email directly, view it on GitHubhttps://github.com/microsoft/clarity/issues/211#issuecomment-2041913906, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AW5BXQ4DNINADAZXKPW5SQDY4IVZVAVCNFSM5MSBD2DKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBUGE4TCMZZGA3A. You are receiving this because you were mentioned.Message ID: @.**@.>>

nik32 commented 6 months ago

You would see a cookie named cc_cookie... just delete it and refresh the page... you will see the popup reappear.

VikasDasamaneni16 commented 6 months ago

Hi Nik,

We still see the user and session cookies being cleared. Could you please let us know which cookies specifically you still see not getting cleared?

Thanks, Clarity Support Team Visit our docs!: https://docs.microsoft.com/en-us/clarity @.**@.> @.***

Confidentiality note: This e-mail, and any attachment to it, contains privileged and confidential information intended only for the use of the individual(s) or entity named in the e-mail. If the reader of the e-mail is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that reading it is strictly prohibited. If you have received this e-mail in error, please immediately return it to the sender and delete it from your system.

From: nik32 @.> Sent: Friday, April 12, 2024 12:39 PM To: microsoft/clarity @.> Cc: Vikas Dasamaneni (HCL Technologies Corporate Ser) @.>; Mention @.> Subject: Re: [microsoft/clarity] How remove consent to clarity (Issue #211)

You would see a cookie named cc_cookie... just delete it and refresh the page... you will see the popup reappear.

- Reply to this email directly, view it on GitHubhttps://github.com/microsoft/clarity/issues/211#issuecomment-2052418829, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BHNGNZAYDGZGKXZRLQMCKPDY5AZ3RAVCNFSM5MSBD2DKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBVGI2DCOBYGI4Q. You are receiving this because you were mentioned.Message ID: @.**@.>>

nik32 commented 6 months ago

Hi @ClaritySupport @VikasDasamaneni16! Thank you for your patience in this matter!

The cookies I am talking about is _clck and _clsk (and others like CLID, MR, MUID, SM which you won't be able to see in below demonstration but they also don't get cleared).

I have enclosed a video demonstrating my issue. In the video you can see that... the first time when popup appeared... I accepted all cookies (you can then see _clck and _clsk being set after the refresh). Now when the second time the popup appeared... I rejected all cookies (but you could still see _clck and _clsk present on the client... even after refresh. Also if CLID, MR, MUID, SM were set... then they would also be present on the client even after client has rejected cookies)

https://github.com/microsoft/clarity/assets/51018572/4fd12381-90de-4e17-aa4d-bc9ea04120db

ClaritySupport commented 6 months ago

Hi Nik,

The video attached shows the values of the cookies being cleared. You are also updated to a session cookie so that it is deleted upon the browser window closing. This is how deleting cookies works in javascript.

Thanks, Clarity Support Team Visit our docs!: https://docs.microsoft.com/en-us/clarity @.**@.> @.***

Confidentiality note: This e-mail, and any attachment to it, contains privileged and confidential information intended only for the use of the individual(s) or entity named in the e-mail. If the reader of the e-mail is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that reading it is strictly prohibited. If you have received this e-mail in error, please immediately return it to the sender and delete it from your system.

From: nik32 @.> Sent: Monday, April 15, 2024 4:29 AM To: microsoft/clarity @.> Cc: Microsoft Clarity Support @.>; Mention @.> Subject: Re: [microsoft/clarity] How remove consent to clarity (Issue #211)

Hi @ClaritySupporthttps://github.com/ClaritySupport @VikasDasamaneni16https://github.com/VikasDasamaneni16! Thank you for your patience in this matter!

The cookies I am talking about is _clck and _clsk (and others like CLID, MR, MUID, SM which you won't be able to see in below demonstration but they also don't get cleared).

I have enclosed a video demonstrating my issue. In the video you can see that... the first time when popup appeared... I accepted all cookies (you can then see _clck and _clsk being set after the refresh). Now when the second time the popup appeared... I rejected all cookies (but you could still see _clck and _clsk present on the client... even after refresh. Also if CLID, MR, MUID, SM were set... then they would also be present on the client even after client has rejected cookies)

https://github.com/microsoft/clarity/assets/51018572/4fd12381-90de-4e17-aa4d-bc9ea04120db

- Reply to this email directly, view it on GitHubhttps://github.com/microsoft/clarity/issues/211#issuecomment-2056602230, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AW5BXQ6TJ4CIKCH3MUMZ2BTY5O2ZHAVCNFSM5MSBD2DKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBVGY3DAMRSGMYA. You are receiving this because you were mentioned.Message ID: @.**@.>>

nik32 commented 6 months ago

@ClaritySupport Got your point regarding cookie deletion in JS!

But what about other cookies like CLID, MR, MUID, SM (their values were not cleared)? Won't it cause GDPR compliance failure?