Overview

Contents

Introduction

Welcome to Radar! Radar is the location context platform. You can use Radar to add location context to your apps with just a few lines of code.

In this overview, we introduce the core concepts of Radar, including the three Radar context types (Geofences, Insights, and Places) and developer tools (the SDK, the API, Integrations, and Toolkit apps).

The rest of the documentation explains these concepts in more detail.

Quickstart

Want to get started quickly? Follow these three steps:

  1. Start tracking. Integrate the SDK to start tracking users. Or, test with our Toolkit apps for iOS and Android.

  2. Add context. Generate contextual events by creating Geofences, enabling Places, or enabling Insights.

  3. Handle events. Handle events client-side or server-side via webhooks or integrations.

Context types

The Radar platform has three context types: Geofences, Places, and Insights.

Geofences

Radar geofencing is more powerful than native iOS or Android geofencing, with cross-platform support for unlimited geofences, polygon geofences, and stop detection.

Create geofences to receive the following events:

  • user.entered_geofence
  • user.exited_geofence

Learn more about Geofences.

Places

Radar can tell you when a user visits a place, chain, or category, even if you haven't set up a geofence for that place.

Radar is integrated with Facebook Places, the same place database that powers Facebook and Instagram, with over 140M places worldwide.

Enable Places to receive the following events:

  • user.entered_place
  • user.exited_place

Learn more about Places.

Insights

Radar can learn a user's approximate home and work locations and tell you when a user is at home, at work, or traveling.

Enable Insights to receive the following events:

  • user.entered_home
  • user.exited_home
  • user.entered_office
  • user.exited_office
  • user.started_traveling
  • user.stopped_traveling

Learn more about Insights.

Developer tools

You can integrate Radar with your apps using our developer tools: the SDK, the API, Integrations, and Toolkit sample app.

SDK

Integrate the SDK into your iOS and Android apps to start tracking users and generating events. The SDK abstracts away cross-platform differences between location services on iOS and Android, allowing you to add location context and tracking to your apps with just a few lines of code.

Before you integrate the SDK, you can test with our toolkit apps for iOS or Android.

Learn more about the SDK.

API

You can access all of your Radar data, including users, events, geofences, and places, via the API. You might use the API to list users in a specific geofence, or to create geofences programmatically.

Learn more about the API.

Integrations

Radar supports a number of server-side integrations. Event integrations like webhooks, mParticle, Segment, Braze, and Urban Airship allow you to send events from Radar to other systems. Geofence integrations like Yext allow you to sync geofences from other systems to Radar.

Learn more about Integrations.

Toolkit

You can use our Toolkit sample apps for iOS and Android to test Radar before integrating the SDK, or to test your implementation of Radar side-by-side with an "ideal" implementation.

Learn more about the Toolkit apps.

Examples

You can use Radar to power location context and tracking for any use case, from shopping to travel to social to on-demand.

For example, to do something if a user is at an airport and traveling, on iOS, using Places and Insights:

Radar.trackOnce { (status, location, events, user) in
    if let place = user?.place,
       let insights = user?.insights,
       place.hasCategory("airport"),
       insights.state.traveling {
        // do something
    }
}

To do something when a user stops at a Starbucks with high confidence, on Android, using Places:

public void onEventsReceived(Context context,
                             RadarEvent[] events,
                             RadarUser user) {
    for (RadarEvent event : events) {
        if (event.type == RadarEventType.USER_ENTERED_PLACE &&
            event.confidence == RadarEventConfidence.HIGH &&
            event.place.isChain("starbucks")) {
            // do something
        }
    }
}

To do something when a user exits their home, via a webhook, using Insights:

app.post('/webhooks/radar', (req, res, next) => {
    const event = req.body.event;
    if (event.type === 'user.exited_home') {
        const userId = event.user.userId;
        // do something
    }
}

To create a delivery geofence, via the API, using Geofences:

curl https://api.radar.io/v1/geofences/delivery/123
    -H "Authorization: org_live_sk_8ca5fdbe82ab7d49a1ca5c3f"
    -X PUT
    -d "description=Delivery #123"
    -d "latitude=40.725934"
    -d "longitude=-74.001062"
    -d "radius=100"

Support

Have questions after reading the documentation? We're here to help! Click the button on the bottom right of any page to chat with us, or email us at [email protected].