I was wondering if there's a way of tracking distance travelled using geolocation. it will be shown as a progress bar so it doesn't need to be accurate to a map it just needs to show distance travelled in metres/feet.

Go to google maps, set your destination to lat0,long0, (zoom in and click until you find it) then go to lat 1 and see how many km are, then divide one by the other to find out a multiplication factor. Do the same for the longitude. Use Google dev console to modify gps coordinates so you can test your code

But from the above link, I can see that 1 degree = 111.2 km, so you can test using this value as a multiplication factor for the values that you get from Browser.location