Question

Where did Amplitude get the device id from?

  • 20 November 2023
  • 0 replies
  • 349 views

There isn’t user id in the service currently so I want to get device id first and then set device id as user id. 

So I set as below,

import { setUserId } from '@amplitude/analytics-react-native';

import { getDeviceId } from '@amplitude/analytics-react-native';

const deviceId = getDeviceId();

setUserId(deviceId); 

I tested several times with my test phones but device id didn’t match with my real test phone device id. (iOS&AOS both) It was not matched with any ids including IDFV, IDFA, UUID(iOS) or ADID(AOS). Plus, whenever I install my app, the device id is refreshed even if I log with the same account. 

Where did Amplitude get the device id from?

 

And I can’t find user id in the User Look-up dashboard in the Amplitude.(All blank in the dashboard now) Can I check user id(device id as user id) in the User Look-up dashboard if I set setUserId(deviceId);?

 

According to the manual(link), Amplitude uses user id and device id to identify unique users automatically then setUserId(deviceId);isn’t necessary?


Thanks in advance!


0 replies

Be the first to reply!

Reply