segmentio/consent-manager

window.analytics.user().traits() vs tracking-preferences document.cookie

j-quelly opened this issue · 2 comments

When I explicitly set my tracking preferences in the EU window.analytics.user().traits() returns my preferences as expected.

However, when I implicitly consent to all tracking, my preferences are not saved to window.analytics.user().traits() instead they're saved to a tracking-preferences cookie. I'm curious why the consent manager does not mutate the object returned from window.analytics.user().traits()?

Does segment analytics v2 parse the tracking-preferences cookie in addition to the window.analytics.user().traits()?

Hi @j-quelly thank you for your report, we start looking into this.

HI @j-quelly sorry for the delay, the information will be saved on two places like the next image:
image

for you second question, no, analytics v2 read all the cookies set on the page and search the preferences with a different name. You can check this file to see that