Skip to main content

Insights

Insights predicts a user's home and work locations and detects when a user is at home, at work, traveling, or commuting.

Insights provides the following user context:

{
insights: {
state: {
home: false,
office: false,
traveling: true,
commuting: false
},
locations: [
{
type: "home",
coordinates: [
-73.977797,
40.783826
],
confidence: 3
},
{
type: "office",
coordinates: [
-73.977797,
40.783826
],
confidence: 3
]
}
}

Insights also provides the following events:

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

You can receive events client-side via the SDK or server-side via event integrations, including webhooks.

Insights is available on the Enterprise plan.

You can enable Insights on the Settings page.

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 may decide to ignore insights based on confidence levels.

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)