Hi @xiaomeng.zhang ,
Thanks for writing in! Taking over this ticket as Belinda is in a different timezone :)
We made the following changes at same time:
1.Change Amplitude SDK to Segment SDK
2.Change Amplitude(Actions) to Amplitude cloud-mode
Found the following problems;
Inconsistent userip before and after. This is by no means a single event, Nearly half of the user ip changed.This leads to a change in the user’s country information.
So what I believe has happened is when you switched to the Segment SDK and the Amplitude cloud-mode, the IP Address being used from the Amplitude SDK was changed, probably due to the Segment SDK getting a different IP Address to the Amplitude one, hence a change of location as well as Amplitude uses MaxMInd’s GeoIP Service to get the location. Have you spoke with Segment about this and how they are getting the IP Address for their SDK? I do not believe switching to cloud-mode would make much of a difference unless Segment require you to send certain variables in the payload.
I want to know the following answer:
1.Is the country different due to ip?
Yes, the country would be from a different IP Address, presumably from the Segment SDK. This might also help!
2.How to get ip(Amplitude SDK / Segment SDK)?
The IP Address is tracked automatically by Amplitude through the JS SDK .
3.Is this caused by the SDK?
I believe Segments SDK is getting a different IP Address and sending it to us, which we then look up in MaxMind and get the corresponding country.
4.Do i have a way to solve this problem
You could switch back to the Amplitude SDK or alternatively, I would reach out to Segment and see if there’s a way to stop using the new IP Addresses or if you can include something in their data payload manually so that it will not change country.
I hope this helps! Let me know if you need any more assistance from Amplitude’s side!