track user locations with WordPress form submissions

How to Detect User Locations In WordPress With Form Submissions

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 leads using WPForms and the Geolocation addon.

Detect User Geolocation With Forms

Why Track the Locations of Site Visitors?

Learning the locations of those filling out your WordPress forms helps you see where your visitors are originating from.

For instance, if a user fills out your t-shirt order form, knowing their exact geolocation on a map lets you ensure accurate delivery.

Besides, tracking WordPress user location allows you to:

WPForms is the best WordPress Form Builder plugin. Get it for free!

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 user’s 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. It’s the world’s best form builder and works as a fantastic WordPress locations plugin. For more details, see this step-by-step guide on how to install a plugin in WordPress.

Next, create a new WordPress form. For help with this step, you can check out our tutorial on how to create a simple contact form in WordPress. Just remember, no matter which type of WordPress form you create, you can track the location of your leads.

Simple Contact Form before setting up wordpress location

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

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

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

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.

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 start, go to WPForms » Addons and find the one labeled Geolocation Addon.

Click Install Addon and then Activate.

wpforms geolocation addon to find user wordpress location

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

In other words, there are no settings to configure. Once the addon is installed and activated, it’s ready to work for you.

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 information in WordPress.

To view the geolocation data, go to WPForms » Entries and click View to access a form entry’s submission data.

view form entry data

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

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

interactive map wordpress location

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

You can also use the geolocation addon to increase user convenience when they’re filling in location details.

When you enable this feature, it’ll display an address autocomplete field. You can also display a map if you’d like to.

Geolocation addon map and address search

Moreover, since WPForms performs WordPress data collection for you, you can also view and manage your form entry data within your WordPress native database.

And there you have it! You know how to 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 for tips.

You might also want to audit links to your forms to make sure your main WordPress forms have a sufficient number of links.

Detect User Geolocation With Forms

Ready to build your form? Get started today with the easiest WordPress form builder plugin. WPForms Pro includes lots of free templates and offers a 14-day money-back guarantee.

If this article helped you out, please follow us on Facebook and Twitter for more free WordPress tutorials and guides.

Using WordPress and want to get WPForms for free?

Enter the URL to your WordPress website to install.

Comments

  1. Why is there not an option to store the Geolocation as a label so you can hand it off to a CRM automatically?

    1. Hi Matt,

      Unfortunately we don’t have a way to do this right now and we currently don’t have any built-in way to send data to CRM. However, I’ve made a note on our feature request list so we can keep it on our radar! Thanks for the suggestion 🙂

      1. Surely you can access the entry field like entries.country, entry.zipcode, entries.city, etc… is that possible or not?

      2. Hi Adam!
        Unfortunately, we don’t have this feature in WPForms currently.
        I apologize for any confusion!

        Have a good one 🙂

  2. Not on pro yet, so haven’t been able to test this out, but: is the Lat/Long to 4 decimal places as in the above photo? We’re a fiber company and this is useful in targeting our network areas…

    Would, as those above have mentioned, be useful to pass this to CRM of course 😉

    1. Hey Terry – Yes, it shows the values up to 4 decimal places as shown in the snapshot! For sending the form data to custom CRMs, you can try Zapier which is very useful in such automation and we have a Zapier addon available with our Pro(or higher) license.

      Have a good one 🙂

      1. only 4 decimal places? im looking for an exact location or very precise. please help me!

      2. Hi Luis! For more accurate location data, additional input would be required from your users which we aren’t able to poll for reliably at this time. If our Geolocation addon is installed, Google or Algolia API’s have been connected (as per this guide), and your user’s browser permissions are permitted to access their devices location data, then you would be able to receive fairly accurate locations recorded.

        I hope this helps to clarify 🙂 If you have any further questions about this, please contact us if you have an active subscription. If you do not, don’t hesitate to drop us some questions in our support forums.

    1. Hey Vinay – Sure! Once you install and activate the Geolocation addon, it will begin collecting geographical data when users submit the form this includes existing WPForms forms, however, entries collected prior to the add-on will not have geographical data on them.

      If you have any further questions, please feel welcome to contact our support team.

      Have a good one 🙂

  3. Can i use this feature to show specific fields based on the location ?
    For example, if customer is located in US then can only select Red Shirt, but if based in France then can see and select only White shirt

    1. Hey Mohammad- Currently, we do not have a way to inbuilt feature to show items/ fields based on the location of the user. I do agree it would be super helpful, though. I’ve made a note of the feature request and we’ll keep it on our radar as we plan out our roadmap for the future.

      As a workaround, you can ask the user to select the respective country and show item/fields conditionally. Here is a guide to show/hide fields conditionally.

      Thanks! 🙂

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.