How does automatic geolocation work?
One of our most popular features is automatic geolocation, which determines the location of your visitors as soon as they load your store locator page. This allows us to instantly show nearby stores without the need to type in a search.
If you've wondered about the details of how this works, read on:
On desktop browsers
When a visitor views your store locator in a desktop browser, we use a technology called IP geolocation to automatically estimate the visitor's location based on their computer's IP address. This is done in the background without any prompts or notices, and the result is that your locator magically displays relevant results without the user clicking or typing anything.
The tradeoff is that IP geolocation is very approximate - the estimates are usually within the correct city, but generally are not accurate to a specific street or block. Due to the nature of the technology, in rare cases the estimate may be far off. IP addresses are not inherently based on physical geography and can change frequently, so the databases used by our providers can occasionally be out of date. Technologies like VPNs (which tunnel your internet connection through another location) can also be an issue.
The good news is that incorrect results are rare and are usually limited to a small number of visitors, and visitors can always type in their correct location to find results. Also, our providers are constantly updating their databases with new information, so often any issues resolve themselves shortly.
On mobile phones
While IP geolocation can work great for desktops, we've found that it often gives poor results for mobile phones. Mobile phone IP addresses are often assigned randomly by your carrier, which makes linking them to a geographical location more problematic.
Fortunately, most phones today allow websites to ask the browser for information about the user's location. This provides very accurate results, usually based on a combination of the phone's GPS system and other location technologies (like nearby WiFi networks). When we detect a visitor using a phone, we'll ask the browser for a location to ensure your store locator shows accurate results.
The tradeoff here is that accurate location data is considered privacy-impacting, so browsers will prompt the user for permission before granting access to the locator. This is usually a single tap away, so we feel it's still a better option than trying to type in a city or address on a phone keyboard. Additionally, if a visitor just tapped on a link to a store locator, they'll likely understand the reason for the request and be open to accepting it.
One other possible issue: for privacy reasons, some browsers (e.g. Chrome) will block the location request unless the site is served over a secure connection ( https). For best results you'll want to make sure your store locator page is served over https - if you're running an e-commerce site, this is generally a best practice anyway.