Sitecore for Developers
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
Blog post by John West
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/
[code language="xml"]<setting name="Analytics.PerformLookup" value="false" />[/code]
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
[code language="xml"]<setting name="Analytics.PerformLookup" value="false" />[/code]
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:
[code language="xml"]<lookupManager defaultProvider="default"> <providers> <clear/> <add name="default" type="YourClass, YourAssembly"/> </providers></lookupManager>[/code]
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