Insights

Contents

Introduction

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

Insights is a premium context type, available only to Enterprise customers.

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

You can enable Insights on the Settings page, under Insights.

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 or Android.

  2. Add context. Enable Insights on the Settings page, under Insights.

  3. Handle events. Wait until Radar learns a user's approximate home and office locations, usually after a few days. Then, handle insights events client-side or server-side via webhooks or integrations.

How it works

When Insights is on, Radar stores and clusters historical location data for each user. Based on the size, location, and time distribution of clusters, Radar learns a user's approximate home and office locations after a few days.

Radar generates a home or office entry event if a user enters their predicted home or office location with sufficient confidence, then a home or office exit event when the user leaves their predicted home or office location with sufficient confidence.

Radar also generates a traveling started event if a user travels more than 100 kilometers from their predicted home location, then a traveling stopped event when the user returns.

If a user is at their predicted home or office location, Radar will not generate a place entry event. Learn more about Places.

Confidence

All insights events have confidence levels. Confidence levels range from 1 (low) to 3 (high). Confidence is based on the size and time distribution of clusters.

On average, Radar learns a user's approximate home and office locations after a few days. In the foreground, Radar needs location data from a few app opens. In the background, Radar needs location data from a few days of activity.

When confidence is low, a user's approximate home and office locations may be the same until they start to diverge over time.

You can ignore insights based on confidence levels. For example, to do something if a user is at home, but only with high confidence, on iOS:

Radar.trackOnce { (status, location, events, user) in
    if let insights = user?.insights,
       insights.state?.home == true,
       insights.homeLocation?.confidence == .high {
        // do something
    }
}

Verify events

You can accept or reject insights events after user check-ins or other forms of verification. Event verifications will be used to improve the accuracy and confidence level of future events.

For example, to accept an event on iOS:

Radar.acceptEventId(event._id, verifiedPlaceId: nil)

To reject an event on Android:

Radar.rejectEvent(event._id);

Support

Have questions after reading the documentation? Visit our Help Center. Still have questions? Click the button on the bottom right of any page to chat with us.