Using geolocation for contacts

Kentico EMS required

Features described on this page require the Kentico EMS license.

You can use geolocation to determine the origin (real world geographic location) of your website’s visitors based on their IP address. The system obtains the geographic data using MaxMind’s GeoIP databases. The default database is GeoLite City, the most accurate of the free IP geolocation databases. You can extend the accuracy of the feature by downloading additional databases.


The system only determines the geographic location of contacts during their first visit on the website. The information isn’t updated when the same contact accesses the website again from a different location.

Configuring geolocation

To set up geolocation for your website:

  1. Open the Settings application.

  2. Navigate to On-line marketing -> Contact management -> Geolocation.

  3. Check Enable contact geolocation by IP.

  4. (Optional) Enter a geolocation Suffix.

    • The system adds the suffix to the values of all text-based contact fields that are obtained using geolocation.
  5. Configure the mappings of the GeoIP fields to Kentico contact fields.


    By default, Kentico contacts do not have an equivalent of the following fields:

    • Area code
    • Metro code
    • DMA code
    • Latitude
    • LongitudeTo create custom fields for holding the data:
    1. Open the Modules application.
    2. Edit the Contact management module.
    3. On the Classes tab, edit the Contact management - Contact class.
    4. Define the fields on the Fields tab.

    Field data type restrictions

    Mind the following type restrictions when assigning target fields for the GeoIP data:


    Only accepts


    Integer-based and text-based columns.

    • When mapping to integer fields, the Country ID value is used
    • Text-based fields use the Country display name value


    Integer-based and text-based columns.

    • When mapping to integer fields, the State ID value is used
    • Text-based fields use the State display name value


    Text‑based columns.

    Postal code

    Integer‑based and text‑based columns.

    Area code

    Integer‑based and text‑based columns.

    Metro code

    Integer‑based and text‑based columns.

    DMA code

    Integer‑based and text‑based columns.


    Decimal‑based and text‑based columns.


    Decimal‑based and text‑based columns.

    Organization/ISP (GeoIPOrg required)

    Accepts text-based columns. Geolocation only updates this field if the GeoIP Organization Database is installed.

  6. Click Save.

Managing your MaxMind databases

You can improve the functionality of geolocation by using more detailed and accurate databases and by keeping your current databases up to date.

Adding GeoIP City

The GeoIP CIty database provides more accurate results than the default GeoLite City database.

  1. Obtain the GeoIP City database.

  2. Place the database file into the ~/App_Data/CMSModules/WebAnalytics/MaxMind/ folder of your web project.

  3. Configure the system to use the new geolocation database by adding the following key to the appSettings section of your web.config file.

    • Specify the name of the database file as the key’s value.

<add key="CMSGeoIPLocationFileName" value="GeoIPCity.dat" />

Geolocation now uses the GeoIPCity.dat database instead of the default GeoLiteCity.dat database.

Adding GeoIP Organization

The GeoIP organization database allows the system to determine the organization name of visiting contacts.

Note that the database only contains data for large corporations and organizations, and does not have guaranteed accuracy. We recommend contacting MaxMind support for more information about the accuracy of the organization data.

  1. Obtain the GeoIP organization database.

  2. Place the database file into the ~/App_Data/CMSModules/WebAnalytics/MaxMind/ folder of your web project.

    Note: The name of the database file must be GeoIPOrg.dat.

Geolocation now supports organization detection.

Updating existing databases

To ensure that the geolocation data is accurate, you need to regularly update your MaxMind databases.

To update your databases, download the newest version and upload the database file to your web project’s ~/App_Data/CMSModules/WebAnalytics/MaxMind/ folder.