CF7 Country Detector is a WordPress plugin designed to capture the user's IP location when a Contact Form 7 form is submitted. The plugin retrieves the user's location data, including city, region, and country, and appends this information to the email body sent by the form. This can be useful for gaining insights into where your form submissions are coming from.
- IP Address Detection: Automatically detects the user's IP address during form submission.
- Location Information: Retrieves detailed location data such as city, region, and country.
- Email Integration: Appends the location data to the Contact Form 7 email body, providing useful context for submissions.
- Download the plugin zip file.
- Go to your WordPress dashboard and navigate to
Plugins > Add New
. - Click on the
Upload Plugin
button and select the downloaded zip file. - Install and activate the plugin.
- Download the plugin files or clone the repository:
git clone https://github.com/builderhall/CF7-Country-Detector.git
- Upload the
CF7-Country-Detector
folder to your WordPress installation'swp-content/plugins/
directory. - Activate the plugin through the 'Plugins' menu in WordPress.
- Ensure that Contact Form 7 is installed and activated on your WordPress site.
- Upon activation, the CF7 Country Detector plugin will automatically start capturing the user's IP location during form submissions.
- The location data will be included in the email sent by Contact Form 7 under the label "User Location".
- WordPress Version: 4.0 or higher
- Contact Form 7 Plugin: Make sure the Contact Form 7 plugin is installed and active.
- The plugin utilizes the ipinfo.io service to fetch location data based on the IP address. Please review their usage policies and adhere to their terms of service.
- Be mindful of privacy and data protection laws in your jurisdiction, especially regarding the collection and use of IP addresses and location data.
- If the location data is not appearing in your emails, ensure that the Contact Form 7 plugin is up to date and that the plugin is properly activated.
- Check for any firewall or security settings that may block external API requests, as these can interfere with retrieving location data.
We welcome contributions! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/YourFeature
). - Commit your changes (
git commit -m 'Add your feature'
). - Push to the branch (
git push origin feature/YourFeature
). - Open a pull request and describe your changes.
CF7 Country Detector is licensed under the GPLv3 or later. You can find the full text of the license in the LICENSE file.
- Special thanks to the developers of Contact Form 7.
- Location data is powered by ipinfo.io.
For any issues or questions, please visit the GitHub Issues page. We appreciate your feedback and are here to help.
Builder Hall Ltd.
- Website: builderhall.com
- GitHub: @builderhall
Thank you for using CF7 Country Detector! We hope this plugin enhances your form submission tracking experience.