IP address and Location properties

  • Updated

IP address and location properties are crucial in tracking and analyzing user behavior within Amplitude Analytics. These properties provide valuable insights into the geographical distribution of your users, helping you understand their preferences, target specific regions, and optimize your product or service accordingly. In this article, we will explore what determines the location of a user, how to block/filter IP Address and location as well as understanding why (none) values would populate for location properties.

How the location properties are determined within Amplitude

Location properties in Amplitude (such as City, DMA, Region, and Country) are determined by GeoIP as stated in our article here. Amplitude uses the MaxMind database, which is widely accepted as the most reliable digital mapping source, to look up location information from the user's IP address. Even though MaxMind is considered the most reliable source, the accuracy and availability of city/region information can vary by country (more info here).

For server-side events, location property values are determined either by GeoIP (which falls back on location_lat and location_long if unavailable), or explicitly defined in your API call. If you prefer to have your own setup when it comes to determining user's location property value, Amplitude's HTTP API allows you to send your own City, DMA, Region, and Country values with your events.

Note: If you choose to send these values, Amplitude will not modify them to reflect GeoIP. Please update all four fields together; setting any one of these fields will automatically reset all others.

Filter out IP address but still determine other location properties

If you want to filter out IP address but still determine other location properties (such as City, DMA, Region, and Country), Amplitude can drop IP address after using it to determine location properties. This is how it works: 

  1. An event is uploaded with an IP address
  2. Amplitude takes the IP address from the upload
  3. Amplitude uses the IP address to determine the location data, like city, country, etc
  4. Amplitude adds all these fields to the event (ip address, city, country, etc)
  5. The system looks at the tracking options/filters for the project and removes fields accordingly
  6. The event is then passed to the next part of the pipeline
  7. When you look at this specific event in Amplitude, it will not have an IP address value (if there isn’t an old value synced from before). It will have a country, city, and device, and other values.

Note: Any IP currently known for a user will be synced to all future events by default. To prevent it, you can unset the IP with the identify API.

If you are using the SDKs and want Amplitude to drop IP address, please configure the options within the SDKs.  If you want to remove IP address on events moving forward, please file a Service Task request on the Support form.

Why is my chart displaying (none) for some location properties

For an overview of why you receive (none) values for your location properties, please refer to this guide.