User activities

The HyperTrack mobile SDK collects location and activity data for your users. This data is available as a Placeline, which represents activity segments of the user.

Placeline

The HyperTrack SDK collects data from the location and activity sensors of the mobile device. This data is sent to the server, where noise is filtered, and the Placeline is built. The Placeline object includes segments like stop, walk, and drive. An example JSON representation is given below.

[
    {
        "time_aware_polyline": "aiseFr_ajVcs{ykxAAA????fA{A????LO????l@t@????r@bA????PT????HL????r@`A????`CcDA",
        "distance": 310.47333797811655,
        "user_id": "4e2a8344-9864-4473-864f-e223dec208b3",
        "type": "trip",
        "encoded_polyline": "aiseFr_ajVAA??fA{A??LO??l@t@??r@bA??PT??HL??r@`A??`CcD",
        "activity": "Walk",
        "duration": 95738.982,
        "ended_at": "2017-07-14T02:41:01.739000+00:00",
        "started_at": "2017-07-13T00:05:22.757000+00:00",
        "trip_id": "5c7a0e2e-35ce-4482-baa3-34f837146071",
        "id": "5c7a0e2e-35ce-4482-baa3-34f837146071_1499904322"
    },
    {
        "id": "885cb75c-c642-4df2-9d0e-8b9bf0d9547b",
        "user_id": "4e2a8344-9864-4473-864f-e223dec208b3",
        "place": {
            "id": "83f46d89-cacd-4a1a-9007-507dbd5a4d7c",
            "name": "",
            "location": {
                "type": "Point",
                "coordinates": [-122.3985203814826,
                    37.7869638230917
                ]
            },
            "address": "182 2nd St, San Francisco, CA 94105, USA",
            "locality": "South Beach",
            "landmark": "",
            "zip_code": "94105",
            "city": "SF",
            "state": "CA",
            "country": "US"
        },
        "started_at": "2017-07-14T02:41:02.046000Z",
        "ended_at": null,
        "duration": 3211.898782,
        "lookup_id": "D2E0C7FD-D1D3-4C1E-9307-82AD6F70BC9D",
        "step_count": 301,
        "step_distance": 210,
        "created_at": "2017-07-14T02:41:02.409459Z",
        "modified_at": "2017-07-14T02:41:02.409487Z",
        "type": "stop"
    }
]

Start tracking

Getting the user's Placeline needs the HyperTrack mobile SDK, available for iOS and Android. You can also use our wrappers for React Native, Cordova or Xamarin.

Pick your mobile platform of choice, install the SDK, and call startTracking(). Once you do, you can get the user's Placeline.

Dashboard view

Once you start tracking, the HyperTrack dashboard shows the user's Placeline on a map. You can embed this view in your own dashboard using widgets.

Get placeline for an action

The Action HTTP entity can be used to represent Placelines that are useful for your workflow. For example, a sales visit can be an action, and for this action, you can obtain the user's Placeline.

API call HTTP method Request url
Get action Placeline https://api.hypertrack.com/api/v1/actions/ACTION_ID/placeline/
curl "https://app.hypertrack.io/api/v1/actions/41caa9f2-ad63-4a8b-98ed-1414c372e1ce/placeline/"
  -H "Authorization: token YOUR_SECRET_KEY"

Next up

Read about other building blocks, or learn what you can build with them.

results matching ""

    No results matching ""