Campaigns
Use campaigns to create location-based notifications effortlessly. Campaigns let you customize your notification content and targeting behavior with ease.
#
QuickstartFirst, sign up for Radar and get an API key.
To use campaigns with geofences, start by creating geofences through the dashboard, a CSV import, or the API.
To use campaigns with places, ensure that places are enabled through the settings page and nearby places
is activated. Reach out to your account manager to enable nearby places
for your project. Then setup nearby places for the project via the settings page.
To use campaigns with events, ensure that the desired trigger events are enabled through the settings page.
To use campaigns with beacons, ensure that the beacons are created and enabled through the beacons page
Once set up, create your campaigns using the dashboard.
#
Create campaignsTo create a campaign via the dashboard, navigate to the campaigns page and click Create. Provide the campaign details, targeting options, and notification details.
Notifications will only be delivered if the campaign is set to Enabled.
#
Campaign types#
Client side geofence (iOS only)Use Radar's client side geofence notifications to display a notification on iOS devices when a user enters a geofence. These notifications work with foreground or "when in use" permissions, dramatically improving their reachable audience.
Radar's client side geofence notifications make use of location notification triggers on iOS. No location data is collected in the background.
Calls to Radar.trackOnce()
and Radar.startTracking()
, which can be configured through remote configuration in the dashboard, will return to the client 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.
#
Event based notificationsEvent based notifications are the more traditional type of location-based notifications that rely on background Always allow
location permission. These types of notifications often provide less reach, but allow for more insight into conversions and analytics.
#
Beacon based notifications (iOS only)Use Radar's client side beacon notifications to display a notification on iOS devices when a user enters a beacon region. These notifications work with foreground or "when in use" permissions. Beacon based locations are much more accurate indoors as compared to GPS based locations, allowing for notification deliveries with high indoor accuracy.
#
Campaign targetingCampaigns allow you to target users based on different triggers. Note not all triggers are available for client side geofence notifications.
In order for a notification to be delivered, all targeting options must be true.
#
Geofences and Places targetingGeofence tags - allow you target groups of geofences based on their shared tags
For event based campaigns, you can target users based on their device type (iOS, Android, or both).
Under advanced options, you can find User ID (the external ID) based targeting to target individual users.
Geofence external IDs - allow you to target individual geofences by their unique ID
Place categories - allow you to target categories like shopping malls (shopping-mall) or restaurants (restaurant)
Place chains - allow you to target specific chains like Starbucks or Target
#
Location authorization targetingTarget users based on their device's location-authorization status. For example, you might target a campaign to only target users with foreground-location permission.
#
Specific users targetingUnder advanced options, you can find User ID (the external ID) based targeting to target individual users.
#
Beacon region targetingTarget beacons based on their tag or their beacon ID. Radar converts those targeting options and converts them into an iBeacon region under the hood to trigger notifications as users enter iBeacon regions.
#
Frequency CappingWith global frequency capping, you can limit the number of notifications a user receives from a campaign. This is useful to prevent excessive notifications for users. To set up frequency capping, navigate to the setting page. Under the campaigns section, define the maximum number of notifications allowed in the specified time window.
The SDK will only sync up to the frequency cap number of notifications. As such, we'd recommend setting a cap of 2 notifications for a time window of 48 hours instead of 1 notification for 24 hours.
Additionally, at the campaign level, you can configure each campaign to ignore the global frequency capping or to set a campaign specific frequency cap (works in conjugation with the global cap).
#
Analytics (iOS only)Requires SDK version v3.19.6
With Radar Conversions, you can log an event whenever a user interacts with a campaign notification.
To enable this for campaigns, make sure radarInitializationOptions.autoSetupNotificationConversion
= true
.
With Radar Conversions, you can also retrieve the source of an opened_app conversion for iOS apps. Within the metadata object of the logged conversion, we will return a conversion_source with either
notification
(app was opened using an external 3rd party notification)radar_notification
(app was opened using the configured on-prem notification):
You can view these campaign conversion analytics by pressing the analytics button on the campaign's page. Alternatively, you can navigate to Geofencing -> Analytics -> Events -> Filters (top right) -> select Type as opened_app -> Apply Filters. From there, select campaign_name from the grouped_by dropdown. See screenshot below:
#
Automated iOS setupRadar can associate opened_app
events with a campaign notification that was clicked on to open the app. To set this up automatically, set the relevant flag on the initialization options.
- Swift
- Objective-C
import UIKitimport RadarSDK
@UIApplicationMainclass AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { let radarInitializeOptions = RadarInitializeOptions() radarInitializeOptions.autoLogNotificationConversions = true Radar.initialize(publishableKey: "prj_test_pk_...", options: radarInitializeOptions)
return true }
}
#import "AppDelegate.h"@import RadarSDK;
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { RadarInitializeOptions *radarInitializeOptions = [[RadarInitializeOptions alloc] init]; radarInitializeOptions.autoLogNotificationConversions = YES; [Radar initializeWithPublishableKey:@"prj_test_pk_..." options:radarInitializeOptions];
return YES;}
@end
#
Manual iOS setupAlternatively, perform the manual setup:
- Swift
- Objective-C
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse) async { Radar.logConversion(response: response) }
- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler { [Radar logConversionWithNotificationResponse:response]; completionHandler();}
#
Deep linking (iOS only)Radar's client side geofence notifications can be used for deep linking. This means that you can use Radar's deep linking functionality to open a specific view via on premise notification taps.
Set up deep linking from the Radar's Dashboards by adding the radar:notificationURL
to the URL Schemes
of the desired navigation view of your app.
#
Automated iOS setupRadar's iOS SDK can automatically set up deep linking for you. To enable this feature, set the autoHandleNotificationDeepLinks
option to true
in the Radar initialize
call.
- Swift
- Objective-C
import UIKitimport RadarSDK
@UIApplicationMainclass AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { let radarInitializeOptions = RadarInitializeOptions() radarInitializeOptions.autoHandleNotificationDeepLinks = true Radar.initialize(publishableKey: "prj_test_pk_...", options: radarInitializeOptions)
return true }
}
#import "AppDelegate.h"@import RadarSDK;
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { RadarInitializeOptions *radarInitializeOptions = [[RadarInitializeOptions alloc] init]; radarInitializeOptions.autoHandleNotificationDeepLinks = YES; [Radar initializeWithPublishableKey:@"prj_test_pk_..." options:radarInitializeOptions];
return YES;}
@end
It is recommended to use the automatic setup in conjugation with the RadarURLDelegate
to handle the URL open. This implementation provides the most light way approach to get started with deep linking.
#
Manual iOS setupIf you want to set up deep linking manually, you can do so by adding the following line to your UNUserNotificationCenterDelegate
implementation.
- Swift
- Objective-C
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse) async { Radar.openURLFromNotification(response.notification)}
- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler { [Radar openURLFromNotification:response.notification]; completionHandler();}
#
Automated React Native setup (iOS only)Radar's React Native SDK can automatically set up deep linking for you. To enable this feature, set the autoHandleNotificationDeepLinks
option to true
in the radarInitializeOptions
via the AppDelegate.mm
.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.moduleName = @"main"; self.initialProps = @{};
BOOL res = [super application:application didFinishLaunchingWithOptions:launchOptions]; RadarInitializeOptions *radarInitializeOptions = [[RadarInitializeOptions alloc] init]; radarInitializeOptions.autoHandleNotificationDeepLinks = YES; [Radar nativeSetup:radarInitializeOptions]; return res;}
#
Handle system deep linkOpening the notification will result in the SDK calling [application openURL:url options:@{} completionHandler:nil];
This will open the URL in the app if it is registered for the scheme, or open the URL in the browser if it is not.
Developers should handle this by handling the custom URL scheme or universal link in their app.
React Native developers should also implement the native iOS handling of the deep link in their app.
Requires SDK version v3.19.6
With frequency capping, you can limit the number of notifications a user receives from a campaign. This is useful to prevent excessive notifications for users. To set up frequency capping, navigate to the campaign settings within the settings page.
From there, define the maximum number of notifications allowed in the specified time window.
The frequency cap is the maximum number of notifications allowed per user in the specified time window. This includes notifications from all campaigns.
The time window is the length of time over which the frequency cap applies. This is a rolling time window, so if the frequency cap is 2 and the time window is 48 hours, a notification could be delivered at hour 1, hour 24, and then a third at hour 49.
There is currently no way to prioritize the delivery of a certain campaign over another.
#
SupportHave questions or difficulties with campaigns? Contact us at radar.com/support.