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.
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
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
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
Copyright © 2022 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, Ipswitch, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.
Powered by Progress Sitefinity