Hi @adeola13,
Thanks for writing this post!
Amplitude’s device ID is a device-specific identifier. For iOS, the Device ID is the identifierForVendor
(IDFV). This does not persist across installs. For Android, we generate a random Device ID that gets stored locally on the phone. However, there is a flag to use the Advertising Identifier as the Device ID if you want. The Advertising Identifier does persist across installs but users have the option of changing this identifier on their devices at any time. See a detailed explanation for how the value is obtained here.
This string is stored locally in the browser's cookie or mobile device. For web-based applications, Amplitude will set the device ID to a randomly-generated UUID by default. It will persist unless a user clears their browser cookies and/ or is browsing in private mode.
Segment’s anonymousID can be used to set Amplitude device ID when using the Segment/Amplitude integration and the it can be used for merging users: https://segment.com/docs/connections/destinations/catalog/amplitude/#prefer-anonymous-id-for-device-id.
I cannot really say what the advantage is for using Segment anonymousID because I am not an expert in Segment’s terms. I would suggest reaching out to Segment support in case of more in-depth questions.
I hope this helps!
Best,