Detect Visitor Locations
Enable the website to detect and grab a visitor’s geo-location. Once detected, the visitor’s location will automatically be inserted into the location search fields on the website.
The Detect Visitor Locations add-on saves visitors an extra step by automatically using their current location when conducting local searches on the website.
How To Get This Add-On
Enabling the Add-On
1. Go to Settings » Design Settings » Search Results Pages:
2. Now Enable or Disable this functionality:
3. Select the icon that will appear in the Location Search when the addon is enabled:
When this add-on is enabled, an icon will display throughout any of the location-related search modules:
Clicking on it will prompt the browser with this message:
Once permission is given, the location will auto-populate within the location fields.
By default the system will wait until the user clicks on the detect location icon to autofill the users location:
However the popup can be set to automatically appear on the page when a user visits the page with the advanced setting:
Prompt Visitors To Share Their Location Automatically On Page Load?
System Variable: location_auto_fill_at_once
Automatically prompting the user to allow the website to "Know your location" prior to clicking or completing a search:
How the add-on works:
- Gets the location of the user's device using the very accurate HTML5 Geolocation API (not the user's IP)
- Searches that location using the Google Maps Geocoding API to get the user's city as recognized by Google Maps
- Inputs that city into the location search fields of the site automatically
When doing a search, the search is based on the center of the city that was processed using the steps above. It is not calculating distance between the user's device and the members in search results.