Many sites use the Geolocation API to fetch the user’s information. For example, McDonalds.com prompts the user for permission to access the browser’s API. Without explicit permissions, it will show an input box for a user’s address.
Other sites like Starbucks.com use a hybrid approach of GeoIP and HTML5 geo-location. By using GeoIP as the default provider, they pre-populate their list with relevant store information and improve the precision of the targeting once the user grants privileges.
Once granted, it will show a populated results page with the nearest locations.
For a tutorial on how to implement HTML5 geo-location, please go here.
Testing HTML5 Geo-location – Starbucks Store Locator
- Log in to your GeoScreenshot account
2. Go to the capture page, enter the URL, make sure “HTML5 Geolocation” is enabled
3. You should see a grid of results
4. Click on a specific screenshot to look at the details