posthog-js
posthog-js copied to clipboard
Cookies not being set
Hi there,
I'm running a Next.js 13 app. I followed the guide here on setting up posthog-js for the front end.
I'm not seeing any cookies being set, so users are given a new ID on every new visit. I've tried Firefox + Chrome. Setting persistence: cookie
doesn't help. Setting persistence:localStorage+cookie
does help, but the only storage that's used is local storage (there's still no cookie stored). I'm seeing cookies for other services being stored fine.
With debug:true
I'm not seeing any info that helps me debug (just events being sent out).
Any ideas what might be happening here? Is there a way to instrument the storage handler so I can see what it's doing?
Can definitely confirm this bug. There is something wrong with the way the cookies get stored. Setting persistence:localStorage+cookie
fixes the issue.