How to profile user location and IP data using hidden visitor form fields and geolocation

  • Updated
Description

If you are using hidden visitor form fields and are using the EPiServer.Personalization.MaxMindGeolocation nuget package you may notice the hidden visitor fields are not tracked in form submissions.

countrycode.png

 

See below for the necessary configuration to get this working. 

Steps

Add the geolocation section in the web.config under </virtualPathProviders>, inside <episerver.framework>. If there is already an existing section, overwrite it.

<geolocation defaultProvider="freegeo">
  <providers>
    <add name="freegeo" type="EPiServer.Forms.Internal.GeoData.FreeGeolocationProvider, EPiServer.Forms" geoApiUrl="http://freegeoip.net/json/{0}" />
  </providers>
</geolocation>