Capture Visitor Country in FireBox Form Submissions
Knowing where your leads come from helps you better understand your audience and improve your campaigns.
With FireBox Forms, you can automatically capture the visitor’s country when the form is submitted and store it alongside the submission entry.
How It Work
FireBox can detect the visitor's location based on their IP address and make it available through Smart Tags.
This allows you to store geolocation data like:
- Country
- Country code
- City
- Region
The data is captured automatically when the form is submitted.
Before You Start
Geolocation must be enabled for country detection to work.
Follow this guide to set it up: How to Activate Geolocation Features
FireBox uses an IP-based method, which may not always be fully accurate.
How to capture visitor's country
Step 1: Add a Hidden Field
To store the country value:
- Edit your form
- Add a Hidden Field
- Set Field Name = country
This field will not be visible to visitors.
Step 2: Insert the Country Smart Tag
Under Field Settings > Default Value, set it to {geo.country}.
This will track the visitor's country label. If you want to track the visitors' country code, use the {geo.countryCode} Smart Tag instead.
This will store the visitor’s country name (for example, Greece) when the form is submitted.
Step 3: Save and Test
- Save your form
- Submit a test entry
- Go to Entries / Submissions
- Confirm the country is captured correctly
How to display the visitor's country in an Email Notification
Assuming you've set up a hidden field to store the visitors country as described above, you can then edit your Form block, go into your email notification and use the following Smart Tag to display the captured visitors country.
{field.country}
Important Notes
- Geolocation is based on IP and may not always be accurate
- Visitors using VPNs or proxies may appear in a different country
- Keep your GeoIP database updated for better results