Skip to main content

Notifications

Use Radar's on-premise notifications to display a notification on iOS devices when a user enters a geofence. Notifications work even with only foreground or "when in use" permissions!

OnPremiseNotifications

Quickstart#

First, sign up for Radar and get an API key.

Then, create geofences via the dashboard, CSV import, or the API.

From there, add values for the following metadata keys to the geofences that will trigger notifications.

Metadata keys#
  • radar:notificationText (string, required): The body text of the notification.
  • radar:notificationTitle (string, optional): The title of the notification, displayed in bold.
  • radar:notificationSubtitle (string, optional): The subtitle of the notification, displayed in bold.
  • radar:notificationRepeats (boolean, optional): Determines whether the notification should be delivered multiple times before notifications are registered again. Defaults to false.

PumpToStoreMetadata

Finally, integrate the SDK and call Radar.trackOnce() or Radar.startTracking(), depending on your use case. Make sure that the syncGeofences tracking option is enabled. Radar will display a notification when the device is detected inside a geofence that has the above metadata keys.

How it works#

Radar's on-premise notifications make use of location notification triggers on iOS. These triggers work with foreground or "when in use" permissions. This feature is privacy-friendly and won't collect any additional location data. Notifications are only displayed after the user opens the app for the first time with the Radar SDK installed.

No additional lines of code are necessary to power on-premise notifications. They function completely under the hood after setup. The same calls to Radar.trackOnce() and Radar.startTracking() will return nearby geofences with notifications, which will then be registered on the device.

Radar only controls the registration of notifications on the device. Once that happens, surfacing notifications is subject to the system limits and heuristics that iOS enforces.

Analytics#

With Radar Conversions, you can log an event whenever a user interacts with a notification.

Add the following line to your UNUserNotificationCenterDelegate implementation to instrument opened_notification events.

extension AppDelegate: UNUserNotificationCenterDelegate {  func userNotificationCenter(_ center: UNUserNotificationCenter,                              didReceive response: UNNotificationResponse,                              withCompletionHandler completionHandler: @escaping () -> Void) {
    Radar.logConversion(request: response.notification.request)  }}

Support#

Have questions? We're here to help! Email us at support@radar.com.