### [How To Track User Locations With WordPress Form Submissions](https://wpforms.com/how-to-track-user-locations-with-wordpress-form-submissions/)

**Published:** September 23, 2022
**Author:** Renee DeCoskey

**Excerpt:** Do you want to learn how to detect user locations with WordPress form submissions? 

Knowing where site visitors filling out your forms are from can help you cater to their needs and turn more leads into paying customers. In this article, we’ll show you how you can learn about the locations of your users using WPForms and the Geolocation addon.

**Content:**

Do you want to learn how to detect user locations with WordPress form submissions?

Knowing the location of the visitors filling out your forms can help you understand your audience better.

Besides, location data is immensely helpful if you’re selling products and wish to process deliveries faster and with more accuracy.

In this article, we’ll show you how you can learn about the locations of your leads using WPForms and the Geolocation addon.

[Detect User Geolocation With Forms](https://wpforms.com/pricing/)

### When Should You Track User Location?

Learning the locations of users filling out your WordPress forms helps you see where they are. There are several ways this can come in handy.

For instance, if a user fills out your [t-shirt order form](https://wpforms.com/how-to-create-a-t-shirt-order-form-in-wordpress-step-by-step/), knowing their exact geolocation on a map lets you ensure accurate delivery.

Besides, tracking WordPress user location allows you to:

- Determine popular time zones and adjust your [email marketing campaigns](http://optinmonster.com/beginners-guide-to-email-marketing/) accordingly.
- Learn where the majority of your volunteers are coming from and [host an event](https://wpforms.com/how-to-make-an-event-registration-form-in-wordpress/) in their city.
- Use the location of site visitors to [translate your forms into other languages](https://wpforms.com/how-to-translate-your-wordpress-contact-forms-step-by-step/).

Now let’s take a look at how to find out the locations of site visitors filling out your WordPress forms.

## How To Track User Locations with WordPress Form Submissions

Here’s a step-by-step guide to tracking your form users’ locations using a WordPress plugin.

### Step 1: Create a New WordPress Form

The first thing you’ll need to do is install and activate the [WPForms plugin](https://wpforms.com/pricing/). It’s the world’s best form builder and works great as a WordPress locations plugin. For more details, see this step-by-step guide on [how to install a plugin in WordPress](http://www.wpbeginner.com/beginners-guide/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners/ "Step by step guide on How to Install a WordPress Plugin").

After you’ve installed WPForms on your site, it’s time to build a form with geolocation capabilities. This is easy to do using the drag-and-drop form builder. You can also get started by choosing from the [2,100+ form templates](https://wpforms.com/templates/) that are available on paid WPForms plans.

To do this, click on **WPForms** from the WordPress dashboard, then click **Add New**.

![Add new form in WPForms](https://wpforms.com/wp-content/uploads/2017/09/add-new-form.png)

This will open up the template Library.

![wpforms template library](https://wpforms.com/wp-content/uploads/2021/11/wpforms-template-library.jpg)

Click on **Use Template** to choose the simple form template (or any other template that works for you).

![use template](https://wpforms.com/wp-content/uploads/2021/10/click-use-template-button.png)

Your new simple form will now open up in the form builder.

![WPForms Simple Contact Form Template](https://wpforms.com/wp-content/uploads/2022/06/simple-form.png)

You can add additional fields to your WordPress form by dragging them from the left-hand panel to your form on the right-hand panel.

Then click on the field to make any changes. You can also click on a form field and drag it around to rearrange the order of form fields on your form.

When your form looks the way you want it to, click **Save**.

![Save button to save your form](https://wpforms.com/wp-content/uploads/2020/11/save-form-1.png)

For detailed help with this step, you can check out our tutorial on [how to create a simple contact form](https://wpforms.com/how-to-create-a-simple-contact-form-in-wordpress/) in WordPress.

Just remember, no matter what type of WordPress form you create, you can track the location of your leads.

Keep reading to learn how!

### Step 2: Set Up Geolocation Tracking for WordPress

Once your WordPress form is ready, you’ll need to install and activate the WPForms [Geolocation addon](https://wpforms.com/addons/geolocation-addon/).

This addon lets you collect and store your site visitors’ geolocation data when they submit forms on your website. It collects the country, state, and city and stores this data with their form submissions.

To get started, go to **WPForms** » **Addons.**

![WPForms addons](https://wpforms.com/wp-content/uploads/2022/08/WPForms-addons-2.jpg)

Once in, find the one labeled **Geolocation Addon** then click **Install Addon » Activate** to get started.

![geolocation addon](https://wpforms.com/wp-content/uploads/2022/08/geolocation-addon.jpg)

The Geolocation addon will now be ready to start collecting site visitor location data since it’s a simple plug-and-play addon.

![WPForms geolocation addon](https://wpforms.com/wp-content/uploads/2025/01/geolocation-addon.png)

But if you want more advanced geolocation capabilities such as enabling automatic pre-fill by location detection, and an interactive map for location pin placement, we recommend using the Google Places API or the Mapbox API. The Geolocation addon supports both of these services.

To do this, head into the WPForms settings to find the Geolocation settings. From the WordPress dashboard, click on **WPForms » Settings**

![wpforms settings](https://wpforms.com/wp-content/uploads/2022/08/wpforms-settings-2.jpg)

On the settings page, click on the **Geolocation** tab.

![geolocation addon](https://wpforms.com/wp-content/uploads/2022/09/geolocation-addon.jpg)

Once in, choose your preferred mapping API service.

![wpforms geolocation addon](https://wpforms.com/wp-content/uploads/2022/09/wpforms-geolocation-addon.jpg)

You’ll need to sign up with the API service you’ve selected, to get an API key or access token.

But before you add your API details, you’ll see a **Current Location** option on the screen. Checkmark this setting if you’d like your form to load with location data of a user automatically pre-filled.

This can speed up the form-filling process for visitors.

![current location geolocation settings](https://wpforms.com/wp-content/uploads/2022/09/current-location-geolocation-settings-1.jpg)

Next, enter the API key/access token for the service you selected, then save the settings.

![current location geolocation settings](https://wpforms.com/wp-content/uploads/2022/09/current-location-geolocation-settings.jpg)

For detailed instructions, here’s our complete documentation on [setting up the Geolocation Addon](https://wpforms.com/docs/how-to-install-and-use-the-geolocation-addon-with-wpforms/).

### Step 3: Get WordPress User Location Data in Form Entries

Once someone submits a form on your website, the Geolocation addon automatically collects the site visitor’s location data in WordPress.

To view this geolocation data, go to **WPForms** » **Entries**,

![Opening the WPForms Entries page](https://wpforms.com/wp-content/uploads/2020/10/wpforms-entries-1.png)

Look for the form whose entries you’d like to view.

![View form entries](https://wpforms.com/wp-content/uploads/2022/09/View-form-entries-1.jpg)

Now, you can click on **View** to access a form entry’s submission data.

![view form entry](https://wpforms.com/wp-content/uploads/2022/09/view-form-entry.jpg)

Once you do this, you’ll see an interactive Map, as well as the following information:

- City, State
- Zip code
- Country
- Approximate latitude and longitude

![interactive map wordpress location](https://wpforms.com/wp-content/uploads/2019/01/interactive-map.png)

This information directly relates to the user who submitted the form. So you’ll get a custom map showing where they’re located.

The Geolocation addon also has address autocomplete and map pin placement features that offer increased convenience for your users.

### Step 4: Enable Address Autocomplete and Map Pin Placement (Optional)

WPForms Geolocation addon offers some super useful extra features that can really improve user experience. For instance, you can show address suggestions to users while they’re entering their address and even add an interactive map that visitors can use to drop a pin to their location.

To access these features, first find the **Address** field under the **Fancy Fields** section.

![Address form field](https://wpforms.com/wp-content/uploads/2022/08/Address-form-field-1.jpg)

In the **Advanced** tab, toggle the **Enable Address Autocomplete** button.

![Enabling address autocomplete](https://wpforms.com/wp-content/uploads/2022/06/enable-address-autocomplete.png)

Now your form will have an address field with autocomplete enabled. This means that as soon as a visitor starts typing their address, they’ll see suggestions closely matching their address. It’s an excellent way to improve user experience by allowing them to fill in address information faster.

You may also want to enable the map display. For this, simply press the **Display Map** toggle button. This is located right under the setting for Adress Autocomplete.

![display map](https://wpforms.com/wp-content/uploads/2022/08/display-map.jpg)

With the map now included in your forms, visitors can drag the pin across the map to pinpoint their precise location. This way, you can get the exact location needed to process deliveries without any hassle.

Save your form, and your new address field will be visible on the frontend!

![address field frontend](https://wpforms.com/wp-content/uploads/2022/09/address-field-frontend.jpg)

And there you have it!

You now know how to track WordPress user locations in WordPress with form submissions.

### Next, Enable WordPress Form Tracking

Do you want to track your WordPress forms and see which ones have the best conversion rate? See our guide on [tracking WordPress form submissions](https://wpforms.com/how-to-use-google-analytics-to-track-form-submissions-in-wordpress/) for tips.

You might also want to [audit links to your forms](https://wpforms.com/how-to-audit-links-to-wordpress-forms/) to make sure your main WordPress forms have a sufficient number of links.

[Detect User Geolocation With Forms](https://wpforms.com/pricing/)

Ready to build your form? Get started today with the easiest WordPress form builder plugin. [WPForms Pro](https://wpforms.com/pricing) includes lots of free templates and offers a 14-day money-back guarantee.

If this article helped you out, please follow us on [Facebook](https://facebook.com/wpforms) and [Twitter](https://twitter.com/easywpforms) for more free WordPress tutorials and guides.

**Categories:** WordPress Tutorials

**Tags:** geolocation, lead generation, small business forms

---

