To actually calculate the the distance traveled, create 3 variables: DistanceTraveled, LastLocationLat and LastLocationLong
Add geolocation plugin to your project then every time the geolocation is updated do like this:
DistanceTraveled = DistanceTraveled + distance(LastLocationLat,LastLocationLong,Geolocation,Latitude,Geolocation.Longitude)
LastLocationLat = Browser.Lat
LastLocationLong = Browser.Long
You cand find the distance(X1,Y1,X2,Y2) in System object, under math section I think