HTML5 Geolocation API in wordpress

Hi, i want to get my site visitor location and pass it to backend function, what is the best way to capture Geolocation information using HTML5 or any other method and be able to pass it to WP