Geolocation and Profile options not working for Hidden visitor profiling

Vote:
 

I have encountered an issue with Episerver Forms when using the Visitor Data Hidden Element Block.

When this block is added to a for the two other options work correctly and record the data correctly. Unfortunately, when the Geo and Profile option is selected, no data seems to get recorded in the form submissions.

Has anyone else encountered this issue or know of a solution?

Thanks!

#198776
Nov 06, 2018 16:17
Vote:
 

Hi Steven,

Due to regulations on data protection (like GDPR), our clients are changing the way they store visitor's data. This update allows our clients to choose not to collect visitor's information data in Form.

Forms collect Data Subject username (of the current authenticated website user) and browser IP address to perform some features. If the personalization policy indicates that personalization should not happen, Forms should stop collecting data.

By default, the built-in Hidden Visitor Profiling element collects much information from the Data Subject's web request.
Depending on the policy, it should stop collecting, and report null to the Forms Submission. This is applicable for Forms 4.17.0 and above.

To turn off personlization on browswer, set the flag 'Do not track' on browswer to true: https://support.google.com/chrome/answer/2790761?co=GENIE.Platform%3DDesktop&hl=en 

Which form version are you using ?

#198799
Nov 07, 2018 5:38
Vote:
 

Hello Quan, thanks for your reply.

We are using Forms version 4.10.0.

The issue we seem to be encountering is that the data is not being recorded when we want it to in the form submission. This means that the Geolocation or Profile options cannot currently be used on the site

Thanks

#198824
Nov 07, 2018 9:42
Vote:
 

Hi Steven,

  1. Profile: By default, user's information is empty (E.g: FirstName, LastName, Address). Make sure user has that information in order to be shown in submission view
  2. Geo: Do you use default Geo provider or you use Freegeo provider ? Free Geo Location Provider has changed the API end point from http://freegeoip.net to https://api.ipstack.com/ . Beside that, in order to call the API we have to register access key (with free key, the request calls can be limited).
    <geolocation defaultProvider="freegeo">
          <providers>
            <add name="maxmind" type="EPiServer.Personalization.Providers.MaxMind.GeolocationProvider, EPiServer.ApplicationModules" databaseFileName="App_Data\GeoLiteCity.dat" />       
            <add name="freegeo" type="EPiServer.Forms.Internal.GeoData.FreeGeolocationProvider, EPiServer.Forms" geoApiUrl="https://api.ipstack.com/json/{0}?access_key=YOUR_ACCESS_KEY" />
          </providers>
    </geolocation>
#198831
Edited, Nov 07, 2018 12:01
Vote:
 

Hi Quan,

I have tried it while being logged in and the information is still not pulled through on submission when selecting the Profile option.

I have also used the default and created a free api key to test the freegeo api and this still doesn't seem to work either. 

Thanks

#198833
Nov 07, 2018 12:51
Vote:
 

Hi Steven,

I have just tested Forms version 4.10.0 with fresh AlloySite and it works well with Hidden Profile. The point here is that FirstName,LastName etc... must have value. It's empty by default when you create a new user.

Regarding FreeGeoProvider, I'm still investigating to see if the API has been changed or not

Will get back here soon :)

#198899
Edited, Nov 08, 2018 11:04
Vote:
 

HI Steven,

Our team has just tested Forms 4.10.0 and it works with FreeGeoProvider.

There are two main points here:

  • The site must be published on internet.
  • If you use free key, use http instead of https in web.config. Replace access_key with your key and it should work
    <add name="freegeo" type="EPiServer.Forms.Internal.GeoData.FreeGeolocationProvider, EPiServer.Forms" geoApiUrl="http://api.ipstack.com/{0}?access_key=06346f9f8b4210e45964d359b306d9ac" />​
#198933
Edited, Nov 09, 2018 8:18
Vote:
 

Hello Quan,

Sorry for the delay in replying, I have been able to get the location to feed through now in the form that has been submitted now.

Unfortunately, I am still having an issue with the profile option. I have made a user and the name and other information has been created for the profile and is stored in the EPi_AspNetIdentityUserProvider and I can see the information in the dbo.AspNetUsers table as well in the database.

Is this the correct place to look?

Thanks

Steven

#198993
Nov 12, 2018 17:03
Vote:
 

Hi Steven,

1) The user information is stored in dbo.[Profiles] table.

2) By default, when creating new AlloySite teamplate, there's configuration section in web.config for user profile's properties. I keep the default configuration like this

 <profile defaultProvider="DefaultProfileProvider">
      <properties>
        <add name="Address" type="System.String" />
        <add name="ZipCode" type="System.String" />
        <add name="Locality" type="System.String" />
        <add name="Email" type="System.String" />
        <add name="FirstName" type="System.String" />
        <add name="LastName" type="System.String" />
        <add name="Language" type="System.String" />
        <add name="Country" type="System.String" />
        <add name="Company" type="System.String" />
        <add name="Title" type="System.String" />
        <add name="CustomExplorerTreePanel" type="System.String" />
        <add name="FileManagerFavourites" type="System.Collections.Generic.List`1[System.String]" />
        <add name="EditTreeSettings" type="EPiServer.Personalization.GuiSettings, EPiServer.Cms.AspNet" />
        <add name="ClientToolsActivationKey" type="System.String" />
        <add name="FrameworkName" type="System.String" />
      </properties>
      <providers>
        <add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="EPiServerDB" applicationName="/" />
      </providers>
</profile>

3) Use can use the example code below to update user information. The new infor then is saved into dbo.[Profiles] table.

private void SaveProfile()
{
    // load by username
    var userProfile = EPiServerProfile.Get("admin");

    // update profile
    userProfile.FirstName = "David";
    userProfile.LastName = "Jame";
    userProfile.Email = "david@episerver.com";
    userProfile.Language = "English";
    userProfile.Country = "England";
    userProfile.Company = "Episerver";
    userProfile.Title = "Web Developer";

    // save profile
    userProfile.Save();
}

4) That's how I test the site. Basically, when submitting, Forms will get user information (hidden profile) via current profile:

var currentProfile = EPiServerProfile.Current;

Hope this help :)

#199004
Edited, Nov 13, 2018 5:32
Vote:
 

Hello Quan sorry for the late reply. I was having a deep look into the issue on the site. It seems to be we are using a different provider as the site is also a commerce website. 

I am not sure if this would cause an issue so thought I would mention it here and see if anyone would know. We have the following in out config:

    <profile defaultProvider="SqlProfileProvider">
      <properties>
        <add name="Address" type="System.String" />
        <add name="ZipCode" type="System.String" />
        <add name="Locality" type="System.String" />
        <add name="Email" type="System.String" />
        <add name="FirstName" type="System.String" />
        <add name="LastName" type="System.String" />
        <add name="Language" type="System.String" />
        <add name="Country" type="System.String" />
        <add name="Company" type="System.String" />
        <add name="Title" type="System.String" />
        <add name="CustomExplorerTreePanel" type="System.String" />
        <add name="FileManagerFavourites" type="System.Collections.Generic.List`1[System.String]" />
        <add name="EditTreeSettings" type="EPiServer.Personalization.GuiSettings, EPiServer.Cms.AspNet" />
        <add name="ClientToolsActivationKey" type="System.String" />
        <add name="FrameworkName" type="System.String" />
        <add name="State" type="System.Int32" allowAnonymous="false" />
        <add name="FullName" type="System.String" allowAnonymous="true" />
        <add name="PreferredBillingAddress" type="System.String" />
        <add name="PreferredShippingAddress" type="System.String" />
        <add name="LastVisited" type="System.DateTime" />
      </properties>
      <providers>
        <clear />
        <add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="EPiServerDB" applicationName="/" />
        <add name="SqlProfileProvider" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="EcfSqlConnection" />
      </providers>

Thanks

Steven

#199140
Nov 16, 2018 12:28
Vote:
 

Hello Quan, Just wanted to post an update.

Thanks for your solution. I have followed what you suggested and call the episerver profiling and save the new details when the users are created or edited. 

Thanks for your solution

Steven

#199275
Nov 22, 2018 11:06
Vote:
 

Good to hear that :)

#199276
Nov 22, 2018 11:09
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.