An Independent Sitecore Learning Resource

Menu

Zeroing In On Sitecore Personalization With GeoIP

Zeroing In On Sitecore Personalization With GeoIP

Author

Brandon Bruno

Published

10/11/2017

Tags

Marketing to users based on location is not a new concept, but new technologies – especially the rise of the ubiquitous smartphone in the past decade – create potential for hyper-accurate campaigns and personalization. Sitecore embraces personalization, and thanks to a few core technologies, personalizing based on end-user location is easier than ever in Sitecore.

Location, Location, Location

There are a few common ways to determine and utilize a user’s location, each with pros and cons that need to be carefully considered. They are listed below in order from broadest to most accurate.

No Location

By default it is best to assume that a user visiting your website could be located anywhere in the world. With this assumption, you know at least one thing: you have one page view, and it came from somewhere on planet Earth.

This isn’t terribly useful if you are looking to customize and personalize a visitor’s experience.

Profile Info

Once a user is ready to create a profile on your website (think social media, e-commerce, or online bill pay), they are probably ready to provide some basic location information. This information is typically tied to a home or work address, so it ends up being fairly static information that is rarely updated. People tend to spend a lot of time between home and work, so there is plenty of opportunity for contextual marketing. Analyzing common commute routes between a user’s home and work also opens up marketing opportunities.

Getting this information from users is a great start on the road to personalization.

Asking for too much information too early in a relationship can be risky. Most people are probably okay to hand out their zip code. Asking for a home address, however, requires more trust. Whats more, this doesn’t tell you about the user’s current location, so this is useful only in certain long-term contexts.

IP Address (“GeoIP”)

Due to the way IP addresses are assigned across the world, plenty of useful location information can be gleaned with just a number. Information based on IP address (a.k.a. “GeoIP”) is usually good for determining the country, state, and city of a user. Generally speaking, IP addresses are based on server-side information, which means a location lookup can be performed before a web page is served to the user. This is the first step in personalizing a user’s experience automatically, and this is where Sitecore begins to shine.

GeoIP does come with some downsides, however. It is possible, although rare, for an end-user to spoof their true IP address (VPNs, etc.). IP addresses may not be accurate down to the city, especially in dense metropolitan areas where ISPs may route traffic to various internet backbones. Mobile devices present the biggest challenge for GeoIP – mobile phones rarely have IP addresses that represent the nearest service tower. For example:

A GeoIP location from a mobile phone, via a WiFi access point. This is the correct city.

GeoIP location from the same mobile phone, this time via the mobile network. This is not the correct city. Missed it by a longshot.

Geolocation

Thanks to super-accurate GPS chips in mobile devices, geolocation can determine a user’s position anywhere on earth by returning a set of coordinates (longitude and latitude) that are typically accurate to a few feet. With the right permissions, geolocation coordinates can be read and utilized in real-time, essentially providing a custom GPS for any website or application.

Kohl’s wants to know where I am – but why?

While incredibly accurate compared to IP addresses, there are a few issues with geolocation. Because the client (typically a web browser) provides the geolocation data, it is easy to spoof a location. Even more important: it is common practice for modern mobile OSes and browsers to require a user’s permission before handing out location data, so users can easily deny this permission. If you must request geolocation from a user, make sure the user knows why you want their location, as this will help them to consider saying “yes” to that permission dialog.

Sitecore, Location, and You

How you use location to personalize in Sitecore may depend on how you answer a few questions:

How accurate does the location of a user need to be?

Geolocation will be the most accurate method of obtaining location, but users may easily deny your request for their specific location. If you only care about state- or region-level personalization, you can get away with higher-level options and maintain a good amount of confidence in the accuracy.

How quickly do you need to personalize based on the location of a user?

Some products – like insurance – are sold differently across markets due to regional differences in laws. This means that a new user to an insurance site has to provide their location fairly early in the shopping process. What if your site can automatically present the user with insurance options based on their location? While you may only be saving an extra few clicks for the user, you’re presenting relevant content right away, which gets a user that much closer to a purchase. This is a great case for IP address-based location services.

Do you want to use Sitecore’s built-in personalization?

Personalization is one of Sitecore’s most powerful and most-used features, but it comes with one major caveat: because personalization occurs during the construction of a page on the server, all personalization information must already be on the server. This means that, out of the box, Sitecore can only personalize via server-based GeoIP location, not client-based geolocation. Sitecore 8.1 integrates with Sitecore’s GeoIP service with very little effort, and pre-built rules means you can start personalizing content right away.

Are you already using third-party personalization or A/B testing tools?

If you’re using another tool besides Sitecore to personalize content (usually on the client side), Geolocation becomes a very realistic option, assuming you get all the correct user permissions. It may be possible to combine Sitecore’s GeoIP location personalization with third-party tools. For example, you could serve a semi-personalized page based on GeoIP location, then invite the user to provide their geolocation from their phone to get even better content or results.

How important is performance for the overall user experience?

When a web request is made to your site, consider the performance implications of the various location requests:

  • Profile Info – the user must manually fill this information out, so there’s no real performance implication for this method. Quickly getting a user to a form, however, is a serious UX consideration if you want to start personalizing early.
  • GeoIP – after a page is requested on your site, a third-party web service call must be made, returned, and processed before your final page is served to users. This could add hundreds of milliseconds to server time. A combination of asynchronous requests and local caching may help alleviate the impact of this delay.
  • Geolocation – since this data comes from the client, a full webpage must be served to the user, permission must be granted for location data, a location obtained, then processed on the client (or AJAX’d back to the server).

How can you avoid the creep factor?

It's no secret for today's users that they are tracked and sold to all over the internet. Most people seem to be okay trading privacy for free services, but there is definitely a line to be crossed. Rarely-used services or online ads can become creepy when they suddenly know a lot about a user - "hey, you're in Johns Creek and like chocolate ice cream, here are some coupons!" Overuse of implicit location data can increase the creep factor faster than anything else, so be sure your users know when their location is being used.

Do you have questions or comments about this post? Find me on Twitter: @SitecoreSpark