microsoft / clarity

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

Remove session cookies when opt-out #568

Open mmonteiroc opened 6 months ago

mmonteiroc commented 6 months ago

Removed the session cookies, instead of rewriting them with -Number.MAX_VALUE + Empty value.

This previously was causing that the date generated was "Invalid date" and therefore, the cookie was remaining in the browser instead of being reased.

This can be seen in the bug I opened previously https://github.com/microsoft/clarity/issues/567

mmonteiroc commented 6 months ago

@microsoft-github-policy-service agree

mmonteiroc commented 6 months ago

This code has been generated on my personal time / with my personal laptop

mmonteiroc commented 1 month ago

@AbdelrhmanMagdy I saw that you approved this PR but its still missing another approval from Clarity team. Any chance you push forward this PR for another review ?

At the moment, we have to have the clarity script locally hosted with the custom code that has been added in this PR in order to remain GDPR compliant, and we are missing out the new bug-fixes / releases due this :)

Thanks in advance :)