---
title: "IP address, location, user agent, and device properties"
description: "How Amplitude derives location properties from a user's IP address using the MaxMind GeoIP database, parses the user agent string for device and platform properties, and how to override or disable IP-based location."
product: data
token_estimate: 2334
---
# IP address, location, user agent, and device properties

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

Amplitude derives a user's location, device, and platform properties from data that arrives with each event, rather than requiring you to set those properties yourself. It looks up city, region, and country from the event's IP address with the MaxMind GeoIP database, and parses the user agent string that client-side SDKs send to determine device context, operating system, and web browser information. You can override the location values server-side through the HTTP API, or stop Amplitude from using the IP address by disabling IP tracking in the SDK or dropping IP addresses after ingestion.

## How Amplitude tracks location properties

Amplitude uses the [MaxMind](https://www.maxmind.com/en/home) database to look up location information from the user's IP address. Even though MaxMind data is reliable, the [accuracy and availability of city and region information can vary by country](https://www.maxmind.com/en/geoip2-city-accuracy-comparison?country=&resolution=50).

By default, Amplitude uses GeoIP to gather location property values based on `location_lat` and `location_long`. You can explicitly define how Amplitude tracks a user's location properties server-side. Amplitude's [HTTP API](https://amplitude.com/docs/apis/analytics/http-v2) lets you send your own `[Amplitude] City`, `[Amplitude] DMA`, `[Amplitude] Region`, and `[Amplitude] Country` values with your events.

> **Note:**
>
> If you send these values, Amplitude doesn't modify them to reflect GeoIP. Always update all four fields together, because setting any one of the fields resets the others.

## How Amplitude determines location properties when IP address is unavailable

Amplitude supports both disabling IP address tracking in the SDK configuration and dropping IP addresses after ingestion. The method you choose affects how Amplitude can determine location properties.

### Disable IP address tracking in the SDK

When you disable IP address tracking in the SDK configuration (for example, [Browser SDK](https://amplitude.com/docs/sdks/analytics/browser/browser-sdk-2#optional-tracking), [Android-Kotlin SDK](https://amplitude.com/docs/sdks/analytics/android/android-kotlin-sdk#disable-tracking), [iOS Swift SDK](https://amplitude.com/docs/sdks/analytics/ios/ios-swift-sdk#disable-tracking)), Amplitude never receives the IP address. Amplitude's back-end services can't reconcile the user's location, and any location properties remain empty.

### IP address filtering

If you request [Amplitude Support](https://gethelp.amplitude.com) to drop IP addresses after ingestion, Amplitude's back-end services process the IP address to determine location, but the IP address itself doesn't persist in Amplitude. Amplitude fills the event's location properties but leaves the IP address empty.

## How Amplitude parses user agent and device information

Amplitude processes device context from client-side SDK fields and, for web events, the user agent string. Amplitude stores the processed values on your events and exposes selected values as built-in properties for analysis.

### User agent parsing

Client-side SDKs can send device context that describes:

1. **Device model**: the specific device model (for example, `iPhone 13`, `Samsung Galaxy S21`).
2. **Operating system**: the OS and its version (for example, `iOS 15.4`, `Android 12`).
3. **Browser**: for web traffic, the browser and its version (for example, `Chrome 98.0.4758.102`).
4. **Platform**: the general platform category (for example, `iOS`, `Android`, `Web`).
5. **Manufacturer**: the device manufacturer (for example, `Apple`, `Samsung`).

### Device properties

Field names differ between event ingestion, exported events, and the Amplitude UI. This table uses the following terms:

- **HTTP V2 API field**: The top-level field that the [HTTP V2 API](https://amplitude.com/docs/apis/analytics/http-v2) accepts when you send an event.
- **Export API field**: The field that the [Export API](https://amplitude.com/docs/apis/analytics/export) returns after Amplitude processes the event.
- **UI label**: The name that chart and filter property selectors display.

For example, the Export API returns `os_name` and `os_version` as separate fields. The UI combines them and displays the result as **OS**.

> **Note:**
>
> This table covers HTTP V2, the Export API, and the corresponding built-in UI properties. SDK payloads, one-off backfills, and destination-specific warehouse schemas can differ.

| HTTP V2 API field | Export API field | UI label | Relationship |
| --- | --- | --- | --- |
| `user_agent` | `os_name` | OS | For web events, Amplitude uses the parsed browser name when you don't send `os_name`. |
| `user_agent` | `os_version` | OS | For web events, Amplitude uses the parsed browser major version when you don't send `os_version`. |
| `user_agent` | `device_family` | Device Family | Amplitude can use parsed device context when explicit device fields are absent. |
| `user_agent` | `device_type` | Device Type | Amplitude can use parsed device context as a fallback. The device type can remain empty when no mapping exists. |
| `os_name` | `os_name` | OS | The explicit input takes precedence over the value parsed from `user_agent`. |
| `os_version` | `os_version` | OS | The explicit input takes precedence over the value parsed from `user_agent`. |
| `device_brand` | `device_family` | Device Family | Amplitude combines this field with the other supplied device components to derive the family. |
| `device_manufacturer` | `device_family` | Device Family | Amplitude combines this field with the other supplied device components to derive the family. |
| `device_model` | `device_family` | Device Family | Amplitude combines this field with the other supplied device components to derive the family. |
| `device_brand` | `device_type` | Device Type | Amplitude combines this field with the other supplied device components and looks up the result in the device mapping. |
| `device_manufacturer` | `device_type` | Device Type | Amplitude combines this field with the other supplied device components and looks up the result in the device mapping. |
| `device_model` | `device_type` | Device Type | Amplitude combines this field with the other supplied device components and looks up the result in the device mapping. |
| `platform` | `platform` | Platform | Amplitude retains the field name. |

Amplitude doesn't expose separate built-in `browser` or `browser_version` fields. Browser SDKs send `user_agent`. For web traffic, Amplitude stores the parsed browser name and major version in `os_name` and `os_version`. The UI combines those fields in the **OS** property.

Amplitude combines `device_brand`, `device_manufacturer`, and `device_model` to determine standardized `device_family` and `device_type` values. A recognized combination maps to Amplitude's standardized device family and type. An unrecognized family can use a combined description of the supplied device components, while `device_type` can remain empty when no type mapping exists.

The UI uses **Device Family** for broad groups such as Apple iPhone or Samsung Galaxy Phone. It uses **Device Type** for specific types such as Apple iPhone 6 or Samsung Galaxy S5. For the complete list of built-in properties, go to [Default user properties](https://amplitude.com/docs/get-started/user-property-definitions).

### How user agent parsing works

1. **Client-side collection**: The Browser SDK sends the user agent string with the event. Other SDKs can send device context through their supported fields.
2. **Server-side parsing**: For web events, Amplitude parses `user_agent` for browser and device context. Explicit `os_name`, `os_version`, and device fields take precedence over values that Amplitude derives from the user agent.
3. **Property assignment**: Amplitude stores processed values in the event fields listed in the Export API column.
4. **Analysis availability**: Amplitude exposes the properties listed in the UI label column for segmentation, filtering, and analysis.

### Controlling device property tracking

To disable automatic tracking of certain device properties, use the `trackingOptions` configuration in the SDK. For example, in the Browser SDK:

```javascript
amplitude.init(AMPLITUDE_API_KEY, {
  trackingOptions: {
    platform: false,
    language: false,
  },
});
```

### Mobile-specific device information

For mobile SDKs (iOS, Android), Amplitude collects additional device information:

1. **iOS**: device model, OS version, and carrier information when available.
2. **Android**: device model, manufacturer, OS version, carrier, and screen dimensions.

This information can help you understand how your app performs across different device types and OS versions.

### Custom device properties

If you need to track additional device information that Amplitude doesn't automatically capture, you can add custom properties to your events:

```javascript
// Example of adding custom device properties
amplitude.track("Button Clicked", {
  screen_resolution: "1920x1080",
  connection_type: "wifi",
  battery_level: 85,
});
```

