microsoft / clarity

A behavioral analytics library that uses dom mutations and user interactions to generate aggregated insights.

Home Page:https://clarity.microsoft.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] - Cookies used prior to consent given

mmonteiroc opened this issue · comments

Clarity version: v0.7.26

We are implementing clarity in our app, and as you can see in the following screenshots, the cookies are set before consent to clarity has given.
image
image

  const clarity = window.clarity;
  if (!!clarity) {
    clarity('consent');
  }

Now, we are aware that cookies are empty, and only filled with a value when consent is given. And erased the value when the consent is removed, but we would expect for the cookies to be erased / not used until consent is granted, instead of using them "empty"

Also mention, that when we give consent, everything works.

When we use "clarity('consent', false)", the same thing happens ( cookies remain, but with empty value )

As an add on, we just discovered that the MUID cookie is added before the consent is given.

Either this cookie should be flagged as "strictly necessary" ( so that we can comunicate this to our customers ) or it should only be added once the consent has been given

System is the same one as previously mentioned, where cookies are disabled by default, and the consent is notified like this window.clarity('consent')

image