Trip Tracking

Use our industry-leading SDK to build experiences for curbside and in-store pickup, delivery tracking, and more.

Quickstart

Want to get started quickly? Follow these three steps:

  1. Create geofences. Import geofences for your locations. Depending on your use case, a geofence might represent a retail store, a restaurant, a hotel, and so on.

  2. Integrate the Radar SDK into your app. Integrate the SDK into your app or website. When a customer places an order or taps "I'm on my way," start tracking and start a trip with custom metadata (like order ID, license plate, or car model).

  3. Display live trips and ETAs. Display live ETAs on Radar's extensible trips dashboard or in your own UI.

Starting and stopping trips

Integrate the SDK into your app or website. When a customer places an order or taps "I'm on my way," start tracking and start a trip with an ID, a destination geofence, a travel mode, and custom metadata (e.g., customer name, car model, or license plate) depending on your use case.

When the order is complete or a customer taps "I'm here," stop tracking and stop the trip.

For example, on iOS:

// order placed or user taps "I'm on my way"
let tripOptions = new RadarTripOptions(externalId: "299")
tripOptions.destinationGeofenceTag = "store"
tripOptions.destinationGeofenceExternalId = "123"
tripOptions.mode = .car
tripOptions.metadata = [
  "Customer Name": "Jacob Pena",
  "Car Model": "Green Honda Civic"
]
Radar.startTrip(tripOptions)
Radar.startTracking(.continuous)

// order completed or user taps "I'm here"
Radar.stopTrip()
Radar.stopTracking()

Trip events

Radar generates events when trips are updated:

  • user.started_trip
  • user.updated_trip
  • user.approaching_trip_destination (configurable ETA threshold)
  • user.arrived_at_trip_destination (destination geofence entered)
  • user.stopped_trip

Events include information about the user and the trip, including ID, status, custom metadata, and ETA. Events will be sent to webhooks alongside other events (e.g., user.entered_geofence).

{
  "events": [
    {
      "_id": "56db1f4613012711002229f6",
      "type": "user.updated_trip",
      "createdAt": "2020-08-20T10:30:55.837Z",
      "live": true,
      "trip": {
        "_id": "5f3e50491c2b7d005c81f5d9",
        "live": true,
        "externalId": "299",
        "metadata": {
          "Customer Name": "Jacob Pena",
          "Car Model": "Green Honda Civic"
        },
        "mode": "car",
        "destinationGeofenceTag": "store",
        "destinationGeofenceExternalId": "123",
        "destinationLocation": {
          "coordinates": [
            -105.06119826017914,
            39.7793665
          ],
          "type": "Point"
        },
        "eta": {
          "duration": 5.5,
          "distance": 1331
        },
        "active": true,
        "arrived": false,
        "createdAt": "2020-08-20T10:27:55.830Z",
        "updatedAt": "2020-08-20T10:30:55.837Z",
        ...
      },
  ],
  "user": {
    "_id": "56db1f4613012711002229f4",
    "live": true,
    "userId": "1",
    "deviceId": "C305F2DB-56DC-404F-B6C1-BC52F0B680D8",
    ...
  }
}

Display live trips and ETAs

In the Radar trips dashboard

The Radar trips dashboard displays active trips for a specific destination geofence, including ID, custom metadata, and ETA.

The trips dashboard is available on the Enterprise plan.

The dashboard is distributed as an enterprise iOS and Android app. Ask your customer success manager for a distribution of the app specific to your organization.

In your own UI

Poll the list trips API to retrieve active trips for a specific destination geofence, including ID, custom metadata, and ETA. For example, you might poll the list trips API from an internal dashboard.

Or, listen for trip events sent to a webhook. From there, forward trip information, including ID, custom metadata, and ETA, to other systems. For example, you might set up a webhook that sends ETA to an order management or kitchen display system.

Support

Have questions? We're here to help! Email us at [email protected].