{"id":58,"date":"2019-12-23T19:31:41","date_gmt":"2019-12-24T03:31:41","guid":{"rendered":"http:\/\/wordpress-210328-1057968.cloudwaysapps.com\/?p=58"},"modified":"2020-01-02T04:17:36","modified_gmt":"2020-01-02T12:17:36","slug":"testing-html5-geo-location","status":"publish","type":"post","link":"https:\/\/wordpress-210328-1057968.cloudwaysapps.com\/testing-html5-geo-location\/","title":{"rendered":"Testing HTML5 geo-location at scale – Store locator example"},"content":{"rendered":"\n
If you want to get very precise geolocation information about your website’s visitors, the HTML5 Geolocation API<\/a> is a very reliable method for fetching real-time location information. Most browsers support the JavaScript API and there are many tools for implementing it. 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. <\/p>\n\n\n\n <\/p>\n\n\n\n Once granted, it will show a populated results page with the nearest locations. Starbucks.com
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.<\/p>\n\n\n\n<\/figure>\n\n\n\n
Example:
<\/p>\n\n\n\n<\/figure>\n\n\n\n
<\/p>\n\n\n\n
For a tutorial on how to implement HTML5 geo-location, please go here.<\/a>
<\/p>\n\n\n\nTesting HTML5 Geo-location – Starbucks Store Locator<\/h2>\n\n\n\n