---
title: Use FreeOpenLocation with Forms
slug: cms-12/docs/use-freeopenlocation-with-forms
docTags: 
createdAt: 2026-08-10T15:56:01.000Z
---

:::hint{type="info"}
- **Prerequisites**
  Install `EPiServer.Forms` package from Nuget.
- Access [ipstack](https://ipstack.com) and get API key.
:::

1. Open `Startup.cs` file
2. Add `AddFreeGeolocationProvider` to services object as below sample

```csharp
services
  .AddCmsAspNetIdentity < ApplicationUser > ()
  .AddCms()
  .AddVisitorGroupsUI()
  .AddCmsHost()
  .AddAlloy()
  .AddAdminUserRegistration()
  .AddEmbeddedLocalization < Startup > ().AddFreeGeolocationProvider("<http://api.ipstack.com/{0}?access_key=API_KEY")>;
```

3. Obtain an API Key from [ipstack](https://ipstack.com) and replace `API_KEY` with it.
4. Deploy project to the online environment (because Loopback IP is ignored).
5. Add **Hidden visitor profiling** into a form container and edit that element.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/ifBIQpvz6JykEpL65CofZ_4906dd0-forms-maxmind-2.png)

6. Select **Geo** in the **Auto-collect visitor data** section with any value listed (such as **City**).

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/FpHyKAi_X7AIdIrBR3NW2_4b2aa8f-forms-maxmind-3.png)

7. Drag and drop the form to a page and publish it.
8. Submit the form.
9. Verify submission data.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/2U4X19sVT3lFYrgCqP-Zq_eb14141-forms-maxmind-4.png)
