IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
When creating a new Personalization user segment and specifying a characteristic by Location, Sitefinity provides suggestions for the available options as you type.
All location options that are supported by Sitefinity and are suggested as you type, are stored in the CitiesList.txt file. The files is located under ~/App-Data/GeoLocation and contains a dictionary of City-Region-Country entries, for example: Boston Massachusetts United States Town of Boxborough Massachusetts United States Boxford Massachusetts United States ..
NOTE: The IpCityLocationService may return none, one, or more than one location matches for a visitor’s IP. Depending on the underlying GeoLocation database the service uses, Sitefinity loads the personalized content only if the location matches the keywords specified in the segment characteristic. In other words, the value coming from the CitiesList.txt is recorded in the database for this personalization segment and is later compared to the location value coming from the IpCityLocationService.
IpCityLocationService
To further customize the behavior of Sitefinity personalization module, you can modify the CitiesList.txt in combination with the IpCityLocationService. For example:
You can modify existing entries to CitiesList to improve accuracy, or simply change the way location suggestions are displayed. For example, you may want to change entries, such as:
London England United Kingdom
City of London City of London United Kingdom
to:
London England England
City of London City of London England
Since the default implementation of IpCityLocationService queries the GeoLite database, the CityLocation returned for a London, UK IP has a value of “United Kingdom” for the CityLocation.Country property. For your modification to work, you need to extend the IpCityLocationService and specify the criteria, according to which IP matches from UK are returned as England. For more information see Extend or replace the IpCityLocationService
CityLocation.Country
Removing an entry from the file removes it from the list with autocomplete suggestions. Thus, you control which locations can be selected.
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important