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.
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important