Skip to main content
Solved

How to change the device_id on the website


Forum|alt.badge.img+2

Hi, Guys.

 

When a user visits our website with a mobile phone, can we set the user's IDFV or AID as the user's Device_id?

 


 

Best answer by Nehita I.

Hi @xiaomeng.zhang ,

Thanks for the clarification! You would need to pass the IDFA and then use the passed IDFA value for the setDeviceID of the JS SDK method. Since IDFA/IDFV/ADID are all used for mobile attribution (hence why you don’t see it in the JS SDK), you would need to get the IDFA yourself and then use that to set the Device ID. 

I hope this helps! 

Best,

Nehita

View original
Did this topic help you find an answer to your question?

Nehita I.
Team Member
Forum|alt.badge.img+5
  • Team Member
  • July 5, 2022

Hi @xiaomeng.zhang , 

This is Nehita from Amplitude Support, thanks for writing in to the Amplitude Community! 

Yes, when a user visits your website with a mobile phone, you can use the user’s IDFV or AID as the Device ID. You can learn more about how to do this here

I hope this helps, but please let me know if you have any questions! 

Best, 

Nehita 


Forum|alt.badge.img+2

Hi, @Nehita I. 

I know that the APP is completely available, and our page provides SDK.

But for the case of using mobile phone to visit the web page, do we provide the SDK to obtain the user's IDFV?
 


Nehita I.
Team Member
Forum|alt.badge.img+5
  • Team Member
  • July 6, 2022

Hi @xiaomeng.zhang ,

Thanks for your response! I just want to ask a couple of questions for clarification. The user is visiting a web app on a mobile site, correct? Are you using the JS SDK for that website, or which SDK are you using? You can, if using JS SDK, use the custom Device ID here. Can you please give more details about your use case? We can do mobile attribution if you are using our Mobile SDKs. If you’re able to get or set an IDFA/IDFV/ADID for the user yourself, then you should use something like this attribution API.

Best,

Nehita 


Forum|alt.badge.img+2

Hi, @Nehita I. 

Further explanation, we hope to get the user's IDFV (only for mobile users) when the user visits the web page, and use it as the Device_id of amplitude, I know that for the IOS SDK we provide a method to change the device_id to IDFV, but in the js SDK In , we only provide a method to change device_id, and do not provide a method to change Device_id to IDFV
 


Nehita I.
Team Member
Forum|alt.badge.img+5
  • Team Member
  • 32 replies
  • Answer
  • July 8, 2022

Hi @xiaomeng.zhang ,

Thanks for the clarification! You would need to pass the IDFA and then use the passed IDFA value for the setDeviceID of the JS SDK method. Since IDFA/IDFV/ADID are all used for mobile attribution (hence why you don’t see it in the JS SDK), you would need to get the IDFA yourself and then use that to set the Device ID. 

I hope this helps! 

Best,

Nehita


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings