Closed gfirem closed 3 months ago
Hi @gfirem, thanks for submitting this issue.
Are you passing the newFormat
field as true
in the AmplitudeCookie::cookieName
, AmplitudeCookie::parse
, and AmplitudeCookie::generate
functions?
Based on the screenshot you provided you're using the analytics-browser
(new) SDK which means you will need to set the newFormat
option to true in those functions.
Finally, the analytics-browser sdk sets a number of additional cookie options like domain, samesite, etc.
I'd recommend looking at amplitude cookie in your debugger and coping all the options into the set-cookie response header when generating a new cookie so the SDK does not create multiple cookies with the same name but different options and values.
I will close the issue, my mistake was to use the deployment key instead of the project api key. Thanks for your help @bgiori
Hello.
I'm using this code example https://www.docs.developers.amplitude.com/experiment/sdks/php-sdk/#access-amplitude-cookies to get the cookie from the client library, and the backend PHP code is not generating the correct cookie name.