Explaining Sitecore DMS Geographic (GeoIP) Personalization Rules
Geographic targeting is one of the more valuable and accessible routes to taking advantage of Sitecore's DMS personalization capabilities.
Geographic targeting lets you tailor a site's content to the location in which a site visitor originates, providing more relevant content and better user experience.
Sitecore's DMS personalization allows content editors to easily target content based on a user's location, but there are some mechanics details that have been difficult to turn up. This blog post aims to educate users on Sitecore’s DMS personalization capabilities, including understanding using different rules to make personalization decisions.
The first step in personalization, before digging into personalization rules, is ensuring that the site implementation is configured to use MaxMind to perform IP lookups that will return all of the geographic information needed to evaluate the rules that will ultimately be set up. Information on how to set up a MaxMind account can be found on SDN.
DMS uses Sitecore's rules engine to make personalization decisions, evaluating the rules a content editor configures to decide what content or presentation components to show a user. The rules that Sitecore provides include a number having to do with geography. These rules cover most use cases, but the syntax of the values that they need to compare against aren't obvious and require some explanation.
I'll explain how each of the rules is used:
- where the area code compares to specific value
- where the business name compares to specific value
- where the city compares to specific city
- where the country compares to specific country
- where the DNS address compares to specific value
- where the IP address compares to specific value
- where the ISP name compares to specific value
- where the latitude compares to specific value
- where the longitude compares to specific value
- where the metro code compares to specific value
- where the postal code compares to specific value
- where the region compares to specific value
Where the Area Code Compares to Specific Value
This rule allows compares the visitor's area code to a specified value. MaxMind exposes area codes as digits only, so compare against "410" not "(410)".
Where the Business Name Compares to Specific Value
In some cases, a business or institution may be available for an IP address. This rule compares against that name. The incidences of these are rather low, however, and when they are not available, the name of the user's ISP is exposed to be tested against.
Where the City Compares to Specific City
This rule compares the visitor's city to the specified value. The list of cities that can be checked against is provided by MaxMind and can be viewed here.
Where the Country Compares to Specific Country
This rule compares the visitor's country to the specified value. The list of countries that can be checked against is provided by MaxMind and can be found in the CSV they provide here.
Where the DNS Address Compares to Specific Value
This rule is similar to the information provided with Business Name, but is more specific. For example, the company may be "The Berndt Group", but the DNS address could read something more like baltimore.berndtgroup.net.
Where the IP Address Compares to Specific Value
IP addresses are one of the most basic building blocks of the Internet, so of course DMS allows them to be checked. IPs can be checked in the standard format: 0.0.0.0.
Where the ISP Name Compares to Specific Value
This rule exposes the ISP that owns the IP address in which the visitor originates. In TBG's case, this would be "Expedient", but it could also likely be "Verizon" or "Comcast.”
Where the Latitude Compares to Specific Value and Where the Longitude Compares to Specific Value
These rules compares against a user's latitude and longitude. Keep in mind that these rules are based on an IP address, not any GPS or other location information that a browser or mobile device may be able to provide. While pinpointing a user's specific latitude or longitude seems to be of little value, the rules are still useful for doing wide ranging geographic targeting, especially when applied together to target a wide swath of the globe.
Where the Metro Code Compares to Specific Value
This rule was one of the more confusing at first, but actually turns out to be incredibly useful. Metro codes correspond to a "Designated Market Area" (DMA), and more information about these DMAs can be found on the Wikipedia article for Media Markets. MaxMind returns the same DMA codes that Google Adwords API does, which makes this page from Google a very useful resource for looking up codes to personalize against. The MaxMind lookup returns the DMA Code from the Google list.
Where the Postal Code Compares to Specific Value
This rule personalizes based on a zip or other postal code. These are available for some IP addresses in Australia, Canada, France, Germany, Italy, Spain, Switzerland, United Kingdom, and the US. In Canada, the first 3 characters are returned, and the first 2-4 characters (outward code) for postal codes in the United Kingdom are provided.
Where the Region Compares to Specific Value
This rule provides personalization choices based on a state, province, or similar geographic unit. The rule should compare against a two character ISO-3166-2 or FIPS 10-4 code for the state/region associated with US and Canadian IP addresses. Additionally, the following are also options that may come back for military IPs:
- AA – Armed Forces America
- AE – Armed Forces Europe
- AP – Armed Forces Pacific
For all other countries, FIPS codes are also exposed.
The MaxMind CSV file also provides information about all of the regions as well, which makes it easy to copy and paste.
This is just the tip of the iceberg in terms of Sitecore’s personalization capabilities, but it’s a great tool for marketers who are eager to begin the personalization journey.
I'd like to thank Sitecore's Casey Piket, who helped supply much of the raw information for this post and my own personalization efforts.
About the Author
Leave A Reply