diff --git a/docs/campaigns.mdx b/docs/campaigns.mdx
index 9a9096200..38e4a80d2 100644
--- a/docs/campaigns.mdx
+++ b/docs/campaigns.mdx
@@ -22,24 +22,28 @@ First, [sign up](https://radar.com/signup) for Radar and get an API key.
To use campaigns with geofences, start by [creating geofences](/geofences#create-geofences) through the dashboard, a CSV import, or the API.
-To use campaigns with places, ensure that places are enabled through the [settings page](https://radar.com/dashboard/settings) 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](https://radar.com/dashboard/settings).
+To use campaigns with places, ensure that places are enabled through the [settings page](https://radar.com/dashboard/settings) 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](https://radar.com/dashboard/settings).
To use campaigns with events, ensure that the desired trigger events are enabled through the [settings page](https://radar.com/dashboard/settings).
+To use campaigns with beacons, ensure that the beacons are created and enabled through the [beacons page](https://radar.com/geofencing/beacons)
+
Once set up, [create your campaigns](/campaigns#create-campaigns) using the dashboard.
## Create campaigns
-To create a campaign via the dashboard, navigate to the [campaigns page](https://radar.com/dashboard/geofencing/campaigns) and click **Create**. Provide the campaign's name, notification body, and targeting details. You can target users using either geofences or places.
+To create a campaign via the dashboard, navigate to the [campaigns page](https://radar.com/dashboard/geofencing/campaigns) 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
+### 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. These triggers work with foreground or "when in use" permissions. No location data is collected in the background.
+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.
+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. Default behavior involves syncing down geofences within 5 kilometers. To sync down geofences from further away, ask your Customer Success Manager to enable unlimited-distance syncing.
Radar only controls the registration of notifications on the device. Once that happens, surfacing notifications is subject to the [system limits and heuristics](https://developer.apple.com/documentation/usernotifications/unlocationnotificationtrigger#overview) that iOS enforces.
@@ -47,36 +51,198 @@ Radar only controls the registration of notifications on the device. Once that h
If the device is already inside the geofence when its client-side geofence notification is being synced, it will fire upon subsequent entry, not immediately.
-## Targeting options
+
+### Event based notifications
+
+Event 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.
+
+### In app messaging
+
+In app messages give you a direct, flexible way to engage users right where they’re already active, without requiring push permissions or external channels. They’re a powerful developer tool for driving adoption, onboarding, and feature discovery with fully customizable timing and presentation.
+
+Radar's in app messages allow you to deliver timely in app messages when we detect that the user is in a targeted geofence. No additional code is required to setup in app messages.
+
+#### Life cycle hooks
+
+##### iOS
+
+``` swift
+class MyRadarInAppMessageDelegate : NSObject, RadarInAppMessageProtocol {
+
+ // Called when the CTA button is clicked by the user and causes the in app message to be dismissed.
+ open func onInAppMessageButtonClicked(_ message: RadarInAppMessage) {
+ ...
+ }
+
+ // Called when the dismiss button is clicked by the user and causes the in app messsage to be dismissed.
+ open func onInAppMessageDismissed(_ message: RadarInAppMessage) {
+ ...
+ }
+
+ // Called just before the SDK displays the in app message. The return values decides if the in app message is displayed or discarded
+ open func onNewInAppMessage(_ message: RadarInAppMessage) -> RadarInAppMessageOperation {
+ ...
+ }
+}
+```
+
+##### Android
+
+``` kotlin
+class MyInAppMessageReceiver : RadarInAppMessageReceiver {
+
+ // Called when the CTA button is clicked by the user and causes the in app message to be dismissed.
+ override fun onInAppMessageButtonClicked(payload: RadarInAppMessage) {
+ ...
+ }
+
+ // Called when the dismiss button is clicked by the user and causes the in app message to be dismissed.
+ override fun onInAppMessageDismissed(payload: RadarInAppMessage) {
+ ...
+ }
+
+ // Called just before the SDK displays the in app message. The return values decides if the in app message is displayed or discarded
+ override fun onNewInAppMessage(payload: RadarInAppMessage): RadarInAppMessageOperation {
+ ...
+ }
+
+
+
+
+}
+```
+
+#### Custom in app messages
+
+The Radar dashboard offers may ways to customize the look and feel of your in app messages. At the same time, we also allow developers to replace the in app message view with their very own custom in app message implementation.
+
+##### Android
+
+Implement your own custom implementation of `RadarInAppMessageReceiver` and override the method `createInAppMessageView`. Then, either pass the `RadarInAppMessageReceiver` as a parameter in `Radar.initialize()` or to `Radar.setInAppMessageReceiver()`
+
+``` kotlin
+class MyInAppMessageReceiver : RadarInAppMessageReceiver {
+
+ override fun createInAppMessageView(
+ context: Context,
+ inAppMessage: RadarInAppMessage,
+ onDismissListener: (() -> Unit)? = null,
+ onInAppMessageButtonClicked: (() -> Unit)? = null,
+ onViewReady: (View) -> Unit
+ ) {
+ val inAppMessageView = myInAppMessageView.initialize(
+ inAppMessage,
+ onDismissListener,
+ onInAppMessageButtonClicked,
+ )
+ onViewReady(inAppMessageView)
+ }
+}
+
+```
+
+##### iOS
+
+Implement your own custom implementation of an class conforming to `RadarInAppMessageProtocol` and override the method `createInAppMessageView`. Then, either pass the class conforming to `RadarInAppMessageProtocol` to `Radar.setInAppMessageDelegate()`
+
+``` swift
+class MyInAppMessageDelegate : RadarInAppMessageProtocol {
+
+ func createInAppMessageView(_ message: RadarInAppMessage, onDismiss: @escaping () -> Void, onInAppMessageClicked: @escaping () -> Void, completionHandler: @escaping (UIViewController) -> Void) {
+ let inAppMessageViewController = myInAppMessageViewController.initialize(
+ inAppMessage,
+ onDismiss,
+ onInAppMessageClicked,
+ )
+ completionHandler(inAppMessageViewController)
+ }
+}
+
+```
+
+
+#### Analytics
+
+Analytics for in app messaging are available out of the box for both Android and iOS without additional setup.
+
+#### Deep linking
+
+The CTA button on the in app message can be used to perform deep linking. Simply define the `CTA link` field during campaign creation
+Deep linking is available for both Android and iOS without any Radar specific setup. However, developer should register the scheme and handle deep linking as described in this [section](#deep-linking-1)
+
+## Campaign targeting
Campaigns allow you to target users based on different triggers. Note not all triggers are available for client side geofence notifications.
-Campaign triggers either target geofences or places. Geofences should be targeted using geofence tags or IDs, while places should be targeted by categories or chains. Targeting applies to a user event when all targeting options are true.
+*In order for a notification to be delivered, all targeting options must be true.*
-You can also target users based on their location-authorization status. For example, you might target a campaign to only target users with foreground-location permission.
+### Geofences and Places targeting
+
+**Geofence 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).
+### User targeting options
+
+Toggle the show advanced button to reveal the user targeting options.
+
+User tags can be used to target specific groups of users. Refer to the [iOS](/sdk/ios#user-tags) or [Android](/sdk/android#user-tags) SDK reference for assigning tags to users. When user tag targeting is configured on a campaign, the campaign will only apply to users who have at least one of the tags targeted.
+
+Alternatively, you can use the User ID (the [external ID](/sdk/ios#identify-user)) 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 targeting
+
+Target 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 targeting
+
Under advanced options, you can find User ID (the [external ID](/sdk/ios#identify-user)) based targeting to target individual users.
-## Notification configurations
+### Beacon region targeting
-You can configure the notifications Radar sends to users when they enter a geofence or place. Customize the notification body, and optionally, the notification title and the deep link URL.
+Target 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.
You can add metadata to the campaign, which will be accessible when the notification is triggered. In iOS the metadata can be accessed from `userNotificationCenter(_:didReceive response:)` with `response.notification.request.content.userInfo["campaignMetadata"]`.
## Frequency capping
+*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 [setting page](https://radar.com/dashboard/settings).
-Under the campaigns section, define the maximum number of notifications allowed in the specified time window.
+To set up frequency capping, navigate to the [campaign settings](https://radar.com/dashboard/settings#campaigns-settings) within the settings page.
-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.
+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**.
-## Analytics (iOS only)
+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.
+
+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).
+
+## Additional setup for notification based campaign
+
+Client side geofence, Event based notifications, Beacon based notifications are considered notification based campaigns. Some additional setup are required for advanced features like analytics and deep linking.
+
+### Analytics
+
+*Requires SDK version v3.19.6*
With Radar [Conversions](/api#log-a-conversion), you can log an event whenever a user interacts with a campaign notification.
+To enable this for campaigns, make sure `radarInitializationOptions.autoSetupNotificationConversion` = `true`.
+
+Refer to the [iOS SDK Conversions reference](/sdk/ios#conversions) or [React Native Conversion references](/sdk/react-native#conversions) for setup instructions.
With Radar [Conversions](/api#log-a-conversion), you can also retrieve the source of an *opened_app* conversion for iOS apps. Within the *metadata* object of the [logged conversion](/sdk/ios#conversions), we will return a *conversion_source* with either
- **`notification`** (app was opened using an external 3rd party notification)
@@ -85,7 +251,11 @@ With Radar [Conversions](/api#log-a-conversion), you can also retrieve the sourc
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 setup
+#### Android setup
+
+No additional setup is required for analytics for Android.
+
+#### Automated iOS setup
Radar 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.
@@ -139,7 +309,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
-### Manual iOS setup
+#### Manual iOS setup
Alternatively, perform the manual setup:
@@ -171,13 +341,21 @@ func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive respo
-## Deep linking (iOS only)
+### Deep linking
-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.
+Radar's campaign 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 setup
+Radar campaigns use local notifications for deep linking. Due to iOS security restrictions, Universal Links opened from local notifications may redirect to Safari instead of your app. For reliable deep linking, use custom URL schemes (e.g., yourapp://) in your notification payloads.
+
+#### Android setup
+
+Refer to the [official android documentation](https://developer.android.com/training/app-links/deep-linking) to configure deep links for the android app. No additional Radar specific setup is required.
+
+#### iOS setup
+
+##### Automatic
Radar'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.
@@ -233,7 +411,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
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 setup
+##### Manual
If you want to set up deep linking manually, you can do so by adding the following line to your `UNUserNotificationCenterDelegate` implementation.
@@ -265,7 +443,10 @@ func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive respo
-### Automated React Native setup (iOS only)
+
+#### React Native setup
+
+##### iOS
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`.
```Objective-C
@@ -273,7 +454,6 @@ Radar's React Native SDK can automatically set up deep linking for you. To enabl
{
self.moduleName = @"main";
self.initialProps = @{};
-
BOOL res = [super application:application didFinishLaunchingWithOptions:launchOptions];
RadarInitializeOptions *radarInitializeOptions = [[RadarInitializeOptions alloc] init];
radarInitializeOptions.autoHandleNotificationDeepLinks = YES;
@@ -281,13 +461,15 @@ Radar's React Native SDK can automatically set up deep linking for you. To enabl
return res;
}
```
-### Handle system deep link
-
-Opening 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](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app) or [universal link](https://developer.apple.com/documentation/xcode/supporting-universal-links-in-your-app) in their app.
-React Native developers should also implement the native iOS handling of the deep link in their app.
+Alternatively perform the manual setup if you are setting the `AppDelegate` as the `UNUserNotificationCenterDelegate`.
+```objc
+- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler {
+ [Radar openURLFromNotification:notification:response.notification];
+ completionHandler();
+}
+```
## Support
Have questions or difficulties with campaigns? Contact us at [radar.com/support](https://radar.com/support).
diff --git a/docs/sdk/android.mdx b/docs/sdk/android.mdx
index 48d64ae9f..ad2a1d96e 100644
--- a/docs/sdk/android.mdx
+++ b/docs/sdk/android.mdx
@@ -1614,6 +1614,41 @@ With the [conversions API](/api#log-a-conversion), log a conversion, such as a p
+### User tags
+
+With the [user tag API](/campaigns#advanced-targeting-options), you can configure [campaigns](/campaigns) to only target users with the corresponding tags:
+
+
+
+
+ ```java
+ Radar.addTags(new String[]{"tag1", "tag2"});
+ Radar.removeTags(new String[]{"tag1", "tag2"});
+ Radar.setTags(new String[]{"tag1", "tag2"});
+ Radar.getTags();
+ ```
+
+
+
+
+ ```kotlin
+ Radar.addTags(arrayOf("tag1", "tag2"))
+ Radar.removeTags(arrayOf("tag1", "tag2"))
+ Radar.setTags(arrayOf("tag1", "tag2"))
+ Radar.getTags()
+ ```
+
+
+
+
+
## Notifications
With `setNotificationOptions`, set the icon and the background color of foreground service and event notifications:
diff --git a/docs/sdk/ios.mdx b/docs/sdk/ios.mdx
index 5ae4ec17b..653cce630 100644
--- a/docs/sdk/ios.mdx
+++ b/docs/sdk/ios.mdx
@@ -1831,3 +1831,36 @@ func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive respo
```
+
+### User tags
+
+With the [user tag API](/campaigns#advanced-targeting-options), you can configure [campaigns](/campaigns) to only target users with the corresponding tags:
+
+
+
+
+```swift
+ Radar.addTags(["tag1", "tag2"])
+ Radar.removeTags(["tag1", "tag2"])
+ Radar.setTags(["tag1", "tag2"])
+ Radar.getTags()
+```
+
+
+
+
+```objc
+ [Radar addTags:@[@"tag1", @"tag2"]];
+ [Radar removeTags:@[@"tag1", @"tag2"]];
+ [Radar setTags:@[@"tag1", @"tag2"]];
+ [Radar getTags];
+```
+
+