Enterprise license required
Features described on this page require the Kentico Xperience Enterprise license.
You can use geolocation to determine the origin (real world geographic location) of your website visitors based on their IP address. The system obtains the geographic data using MaxMind's GeoIP2 Databases (opens in a new tab).
By default, the system does not contain a geolocation database – you need to add at least one manually. You can either use the free GeoLite2 City database, or purchase the GeoIP2 City database for increased accuracy. Optionally, you can also use the GeoLite2 ASN database to get additional organization (ASN (opens in a new tab)) data.
To obtain the free databases, you need to sign up for a GeoLite2 account (opens in a new tab), create a license key, and set up a download mechanism. Visit the GeoLite2 Free Downloadable Databases (opens in a new tab) page for more information.
Note
The system only determines the geographic location of contacts during their first visit on a website. The information is not updated when the same contact accesses your websites again from a different location.
To set up geolocation for your websites:
Open the Settings application.
Navigate to the On-line marketing -> Contact management -> Geolocation category.
Select the Enable contact geolocation by IP checkbox.
(Optional) Enter a Suffix for mapped data.
Configure the mappings of geolocation data to Xperience contact fields.
Note
By default, Xperience contacts do not have fields for storing the following types of geolocation data:
Field data type restrictions
Mind the following type restrictions when assigning target fields for the geolocation data:
Field | Only accepts |
|---|---|
Country | Integer-based and text-based fields.
|
State | Integer-based and text-based fields.
|
City | Text‑based fields. |
Postal code | Integer‑based and text‑based fields. |
Metro code | Integer‑based and text‑based fields. |
Latitude | Floating-point number and text‑based fields. |
Longitude | Floating-point number and text‑based fields. |
Organization/ASN | Text-based fields. Note: Organization data is only available if you add the GeoLite2 ASN database to your project. |
Click Save.
By default, the system does not contain a geolocation database. To use geolocation for contacts:
Download the database files in binary format.
Database file location
Always place the database files into the ~/App_Data/CMSModules/WebAnalytics/MaxMind/ folder of the MVC project that provides your live site. You may need to manually create the required folder structure.
You can either download the free GeoLite2 City (opens in a new tab) database or purchase the GeoIP2 City (opens in a new tab) database (provides more accuracy and details).
By default, the system is configured to use the GeoLite2 City database. If you wish to use the more extensive GeoIP2 City database, you need to add the CMSGeoIPLocationFileName key to the appSettings section of your project's web.config file. Specify the name of the database file as the key's value.
<add key="CMSGeoIPLocationFileName" value="GeoIP2-City.mmdb" />The GeoLite2 ASN database allows the system to determine the organization name of visiting contacts (based on ASN (opens in a new tab) data).
Geolocation now supports organization detection, and you can map the data to a contact field in the Xperience geolocation settings. For example, you can use the default Company field of contacts.
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 MVC project's ~/App_Data/CMSModules/WebAnalytics/MaxMind/ folder.