Microsoft

GeoIP – Getting Started

GeoIP is quickly becoming a necessity for the analytics functionality of Sitecore. With GeoIP we can personalize content based on the user’s location to present the most relative information and provide a more engaging user experience.
Starting with Sitecore 8.1, the necessary config files and dlls are included in the base install. Prior to 8.1, there is a separate package needed to add the GeoIP functionality.
Before getting started, you’ll need to setup the subscription service and you can do that from the App Center in the Sitecore dashboard (use IE, as Chrome does not work with the Silverlight components).
AppCenter1
Once in the App Center you’ll see the available packages. The one we are interested in at this time is the Sitecore IP Geolocation Service. Logging in through the App Center with valid credentials will allow you to subscribe to the GeoIP service. The pricing for the service is dynamic and can range from ~$25/year up to several thousand based on the total number of annual lookups. If you are unable to log into the App Center, please contact your Sitecore Sales rep for assistance.
AppCenter
After you’ve subscribed to the service you’ll need to install the GeoIP package available from dev.sitecore.net. If you are using 8.1 and higher, this section does not apply and your setup work is done!
DevCenterDownload
Download the package and launch your Sitecore instance. The GeoIP package is installed using the Installation Wizard under the Development Tools.
1
Accept the license agreement and press the ‘Next’ button.
2
Continue through the install by pressing the ‘Install’ button.
3
When prompted, restart your Sitecore client.
4
Once the install is complete you’ll need to navigate to your site root’s /App_Config/Include/CES directory and enable the 3 Sitecore.CES config files. To enable the config files, remove the ‘.disabled’ extension from them.
5
In Sitecore 8.1 and higher there are additional configs in the CES folder and the GeoIP files are enabled by default.
CESConfigs
 
You are now ready to start using the GeoIP service in your Sitecore instance.
I’ve come across this handy Chrome extension that I’ve used extensively over the past few days to test the GeoIP functionality. It provides a nice interface for specifying the IP address that should be used for the request. This has come in very handy while testing personalized content for different U.S. states.
Sitecore Analytics Testing Tools
After installing the extension, a new Sitecore icon is available in the Chrome browser.
ChromeExtension
Click on the extension icon to view the available options and manager your profiles.
ChromeExtension2
Select the ‘Manage Profiles’ option to add IP information for testing purposes.
ChromeExtension3
Give the profile a meaningful name and associated IP address, then press the ‘Add Profile’ button.
ChromeExtension4
*note in the image above the Analytics.ForwardedRequestHttpHeader setting actually is contained in the /App_Config/Include/Sitecore.Analytics.Tracking.config. In earlier versions it may have existed in Sitecore.Analytics.config, but from 8 update 4 up through 8.1 update 2 it’s in the Sitecore.Analytics.Tracking.config file.
To test the functionality, select a profile from the GeoIP list and then press the ‘New Visit’ option under Cookies. This will spoof your ip address with the one setup for the profile. Upon refresh any personalized content that is dependent on the visitor’s location should be updated.
ChromeExtension5
In my next blog post https://blogs.perficient.com/microsoft/2016/04/geoip-working-with-it/, I go over how to actually use the functionality through personalization and from an MVC controller.
Stay tuned.

Thoughts on “GeoIP – Getting Started”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

William Cacy

More from this Author

Subscribe to the Weekly Blog Digest:

Sign Up
Categories
Follow Us
TwitterLinkedinFacebookYoutubeInstagram