Detect Visitor Locations

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000045203-detect-visitor-locations

Very ImportantFor this add-on to work, the site needs to have an SSL Certificate installed and Google Maps API Integration needs to be completed.


Overview


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
  1. Websites with the VIP Add-Ons Club automatically have this add-on available: Join The VIP Add-Ons Club
  2. Purchase Individually: Detect Visitor Locations


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.




Advanced Setting


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:

    

  1. Gets the location of the user's device using the very accurate HTML5 Geolocation API (not the user's IP)

  2. Searches that location using the Google Maps Geocoding API to get the user's city as recognized by Google Maps

  3. 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.