Sitecore 8 : Geo IP Lookup Configuration Tips

Greetings Readers,

I have compiled few tips related to the Geo IP configuration with sitecore


Spoofing Geo IP for local Development

There are some really good posts out there which illustrates how to spoof geoIP for local development, Honestly I have felt that the chrome extension is by far the most stable and comprehensive plug-in for spoofing IP addresses

Sitecore Analytics Testing Tools Chrome Extension by Derek Hunziker

https://chrome.google.com/webstore/detail/sitecore-analytics-testin/pecalkbdlhhhcoenmcjnmhgnncnkdgak?hl=en-US

Blog post by John West

http://www.sitecore.net/learn/blogs/technical-blogs/john-west-sitecore-blog/posts/2011/05/spoof-an-ip-address-to-test-geoip-with-the-sitecore-customer-engagement-platform.aspx

Another one by Patrick Jones

http://patrickmjones.com/blog/2014/03/17/testing-geolocation-with-sitecore/


Enable Look ups on only one server in scaled environments

The Analytics.PerformLookup setting in the /App_Config/Include/Sitecore.Analytics.config file governs the lookup activity, and is true by default. In a scaled environment Disable GeoIP lookup on all the production (CD) servers by setting the below value in the Sitecore.Analytics.config file. The below setting should be set to TRUE on only one server (for example : least loaded server, as a rule – CM server)

If more than one server configured as true for this setting can cause SQL deadlocks and other problems, as well as using your queries to MaxMind.

more details : https://blog.horizontalintegration.com/2015/02/12/sitecore-analytics-exception-in-geoip-worker-thread/

<setting name="Analytics.PerformLookup" value="false" />

Disable GeoIp functionality completely

If you sitecore implementation is not using Geo IP functionality then you can safely disable the complete functionality by setting the below setting to false

<setting name="Analytics.PerformLookup" value="false" />

Also please make sure to disable the below config files

  • Website\App_Config\Include\CES\Sitecore.CES.config
  • Website\App_Config\Include\CES\Sitecore.CES.DeviceDetection.config
  • Website\App_Config\Include\CES\Sitecore.CES.GeoIp.config
  • Website\App_Config\Include\CES\Sitecore.CES.GeoIp.LegacyLocation.config

Change the Default Lookup Provider

In order to implement a custom lookup provider :

Create your custom provider class that is derived from the Sitecore.Analytics.Lookups.LookupProviderBase abstract class.

Disable standard GeoIp functionality in Sitecore by adding “.example” to the end of the following file names:

  • \App_Config\Include\CES\Sitecore.CES.GeoIp.config
  • \App_Config\Include\CES\Sitecore.CES.GeoIp.LegacyLocation.config

In the \App_Config\Include\Sitecore.Analytics.config file, configure the lookup provider to use your custom class:

<lookupManager defaultProvider="default">
  <providers>
    <clear/>
    <add name="default" type="YourClass, YourAssembly"/>
  </providers>
</lookupManager>

Troubleshooting Sitecore Lookup Provider

Below is a list of knowledge base articles which troubleshoots various issues with the lookup provider

Troubleshooting the MaxMind provider https://kb.sitecore.net/articles/606943

MaxMind lookups do not get updated :  https://kb.sitecore.net/articles/777948

Personalization with Geo-based conditions does not work properly on the first visitor request :  https://kb.sitecore.net/articles/320734

 

If you have questions , please comment or tweet me @sjain_hi

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: