Track Work with Geotags

Introduction

For example, you are building a location aware sales force tracking solution. Operations managers have fleets of sales reps visiting customers during their working day.

At each customer visit site, sales reps can make notes in their app in real-time. Operations managers get full visibility where their sales reps are at any given moment, and at the same time can audit notes sales reps make in their dashboard on the map. At the same time, it's important to enable location tracking for sales rep's app to only track during work hours to protect their privacy outside during personal hours.

Use geotags to make notes

Use geotags to generate notes from the user's app. HyperTrack SDK provides Geotags on iOS and Android.

Every important app event that is generated by your app user can be captured as a geotag with a payload that represents it.

HyperTrack platform will process geotags sent from your mobile app in the cloud and process them in real-time with analysis for location accuracy.

Additionally, even if your app user's device is temporarily disconnected due to a network loss, geotags generated by your users will be nevertheless captured and sent to HyperTrack once connection is restored.

important

Geotags are generated only in the mobile app itself, with the help of HyperTrack SDK. Your app is the source of truth for geotagging.

Geotag payload structure and example

An geotag payload can be a JSON string describing a note your app user may make.

For example, to represent a customer visit, you may want to create this payload as shown below:

{
"product_id": "Kent Ace",
"action": "sold",
"quantity": 5,
"customer_name": "Amit K"
}

As you trigger an geotag in your app, you do not need to worry about getting location and timing to compose customer event marker payload. HyperTrack will process your geotag payload for location and provide you with distance tracking between geotags.

Send geotags from your user's app

The examples below demonstrate how to accomplish this for both iOS and Android with the example payload as discussed:

// create new geotag payload
Map<String,Object> payload = new HashMap<>();
// add event details from the example above
payload.put("product_id", "Kent Ace");
payload.put("action", "sold");
payload.put("quantity", 5);
payload.put("customer_name", "Amit K");
sdkInstance.addGeotag(payload);

Send expected locations with geotags

Optionally, you can specify an expected location longitude and latitude to send along with a geotag payload.

This will allow you to verify true location of the mobile app user against the expected location, which may help with either fraud detection or address correctness verification.

Please see examples below:

// create new geotag payload
Map<String,Object> payload = new HashMap<>();
// add event details from the example above
payload.put("product_id", "Kent Ace");
payload.put("action", "sold");
payload.put("quantity", 5);
payload.put("customer_name", "Amit K");
val expectedLocation = Location("any")
expectedLocation.longitude = -90.0260493
expectedLocation.latitude = 35.0476912
sdkInstance.addGeotag(payload, expectedLocation);

Observe geotags in operations dashboard

HyperTrack dashboard will display geotags in device history view. These are fully embeddable views that you can integrate directly into your ops dashboard.

In the map view, once you select the device you are interested in the left column, please click on the pop-up icon next to it to get to a single device view window.

Each geotag is denoted as a blue dotted marker in both your device history timeline as well as on the map itself. Once you zoom in and click on the blue dot you are interested in, you can see the geotags with sales rep visit notes. Each blue dot represents a geotag your app user made from the app by sending a geotag to HyperTrack.

Custom Event Marker in Dashboard

This view demonstrates how your a geotag will be displayed by HyperTrack after it's delivered from your user's mobile app. HyperTrack also provides location and timestamp in addition to the payload data from the example above.

Integrate geotags in real-time with your app backend via webhooks

If your app business workflow requires real-time integration of app user's notes as they take place, you may use HyperTrack webhooks feature to get this information.

Please review an example payload as shown below.

You can see that not only you get back payload data your app user generated from the mobile app, but also route_to data which contain distance in meters, duration in seconds, start_location from the previous geotag event for which distance and duration is generated, as well as recorded_at timestamp which captures the time this geotag was received from your user's app.

Plus, you get location that HyperTrack captures for you when your app user generates a note in the app.

{
"created_at": "2019-07-01T14:01:00.000000Z",
"recorded_at": "2019-07-01T14:00:00.000000Z",
"data": {
"metadata": {
"product_id": "Kent Ace",
"action": "sold",
"quantity": 5,
"customer_name": "Amit K"
},
"route_to":{
"distance": 238,
"duration": 63,
"start_location": {
"geometry": {
"coordinates": [
-6.271,
57.6398983
],
"type": "Point"
},
"recorded_at": "2019-07-01T13:52:08.213000Z"
}
}
},
"location": {
"type": "Point",
"coordinates": [
-6.2755,
57.6398983
]
},
"device_id": "00112233-4455-6677-8899-AABBCCDDEEFF",
"type": "geotag",
"version": "2.0.0"
}

Questions?

If you have questions or comments on any of the topics above, please do not hesitate to contact us.