You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The difference is subtle, but getStorageValue would return null or undefined if the value wasn't set. That means hasOptedIn and hasOptedOut could both return false. But now, isOptedIn is explicitly the opposite of isOptedOut. If there is no preference, isOptedOut will return false, and isOptedIn will return true. This is not correct, and breaks the behavior of has_opted_in_capturing().
Until earlier this year, the recommended way to implement a cookie banner was by checking !(posthog.has_opted_out_capturing() || posthog.has_opted_in_capturing()). Now, any site that has implemented this mechanism is accidentally violating the GDPR by not displaying the cookie banner, even when the user has not consented.
Further, has_opted_in_capturing() has undoubtedly been used in many places to explicitly turn on additional features and behavior that is predicated on the user having opted in.
My hope is that has_opted_in_capturing() will be corrected to represent the user's actual consent.
The text was updated successfully, but these errors were encountered:
In #1176,
has_opted_out_capturing
andhas_opted_in_capturing
changed behavior significantly.Before that PR, those functions called
hasOptedIn
andhasOptedOut
, which were defined as:and:
but after that PR, those functions were redefined:
The difference is subtle, but
getStorageValue
would return null or undefined if the value wasn't set. That meanshasOptedIn
andhasOptedOut
could both returnfalse
. But now,isOptedIn
is explicitly the opposite ofisOptedOut
. If there is no preference,isOptedOut
will return false, andisOptedIn
will return true. This is not correct, and breaks the behavior ofhas_opted_in_capturing()
.Until earlier this year, the recommended way to implement a cookie banner was by checking
!(posthog.has_opted_out_capturing() || posthog.has_opted_in_capturing())
. Now, any site that has implemented this mechanism is accidentally violating the GDPR by not displaying the cookie banner, even when the user has not consented.Further,
has_opted_in_capturing()
has undoubtedly been used in many places to explicitly turn on additional features and behavior that is predicated on the user having opted in.My hope is that
has_opted_in_capturing()
will be corrected to represent the user's actual consent.The text was updated successfully, but these errors were encountered: