Determining user location using the user IP address

At a glance: Targeting new or existing users can require segmenting them by their general location, for example, city, or state. This impacts creative selection, campaign cost, and the overall engagement and quality of the users while maintaining user privacy. 


Determining user location

Each time a user performs an action, install, and in-app events, this often includes the device IP address. 

  • AppsFlyer converts the IP address into geo-location information using information from a third-party global provider, Digital Element.
  • The geo-location information can include:
    • Territory (country): ISO 3166 (alpha-2) codes, or  EU (Europe) or AS (Asia) if no territory-specific information is available
    • City: This may correlate to a neighborhood or district within the city without being directly related to the actual city boundaries
    • DMA (designated market area, regions, or geographic areas for television viewing measured by the Nielsen company. Metro codes in CSV file
    • Region Localized regions in CSV file
    • Province or state
    • Postal code
  • The IP address to geo-location tables are updated at regular intervals, usually weekly.

Example: Conversion of IP address to geolocationIPTables_us-en.png

 Note regarding the United Kingdom (UK)

  • In the platform, the United Kingdom is denoted using the code UK.
  • The ISO 3166 code for the United Kingdom is GB. UK is reserved, but not allocated, by ISO for the United Kingdom.

Reasons for location discrepancy

In some cases, there may be differences in the derived location of users between AppsFlyer and other platforms, even if the other platform uses Digital Element to resolve IP addresses. Possible reasons for location discrepancy: 

  • Periodic updates: to enable fast attribution, AppsFlyer resolves the IP addresses into location data internally. AppsFlyer fetches the global map from Digital Element periodically and not in real-time. If AppsFlyer and the other platform fetch Digital Element data at different times this can explain differences. 
  • ISP Changes: Digital Element databases change rapidly as ISPs change their IP mappings. 
  • Different Plans: Digital Element offers different package plans based on the required level of accuracy. Other platforms using different Digital Element packages may provide different results.
Was this article helpful?