Solved

I have two types of cookies available to determine the device_id. Please advise me on which value to use.

  • 5 June 2024
  • 1 reply
  • 47 views

 

I need to determine the device_id using cookies, but there are two types available. Could you please advise on which value to use?

  1. amp_xxxxx : lowercase ‘amp’  with 6 digits of project API
  2. AMP_xxxxxxxxxx : uppercase ‘AMP’ with 10 digits of project API

I have read the material from the link, and it states that option 2 is correct, but the screenshot example shows option 1, which is confusing. Additionally, most users who visit our service have cookie option 2, but there are still some who do not. Therefore, I am unsure if using option 2 is the correct choice. Could you please explain the difference between the two cookie options and advise which one would be more appropriate to use?

icon

Best answer by Thao Nguyen 7 June 2024, 09:35

View original

1 reply

Userlevel 3
Badge +5

Hi Sangin,

Thank you for posting on Amplitude Community. Happy to help!

The 'amp_xxxxx' cookie is created by the JavaScript SDK. You can learn more information in our article.

Whereas, the 'AMP_xxxxxxxxxx' cookie is created by the Browser SDK. More details can be found here.

If you have implemented the JavaScript and Browser SDKs on your website, you may notice those two types of cookies. However, those should serve the same purpose.

Here is a list of data that is stored in the cookie: https://www.docs.developers.amplitude.com/guides/cookies-consent-mgmt-guide/#data-stored-in-the-cookie

I appreciate you flagging the outdated screenshot. I will reach out to the relevant team to get this updated.

I hope this helps. Please don't hesitate to let me know if you have any questions.

Best regards,
Thao


P.S. Checkout upcoming events and user meetups on our events page.

Reply