-
Notifications
You must be signed in to change notification settings - Fork 31
Kenny/ Campaign docs revamp #631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
We dont need this anymore correct?
Broke into subsections
Forgot to make these separate pushes, but: - removed the notifications section for duplicity and made sure to cover that content in other sections - added more info to frequency capping - added notes about the SDK version required
Brought in more info from notifications. Added dependency info in conversions.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…to kenny/in-app-messaging-docs merging from ben's big update to docs
…essaging-docs merge user tags docs
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR consolidates campaign documentation updates from multiple previous PRs to revamp the stale campaign documentation, bringing it up to date with current campaign offerings and features.
Key changes include:
- Added comprehensive documentation for user tags functionality across iOS and Android SDKs
- Expanded campaign types to include in-app messaging, beacon notifications, and event-based notifications with detailed implementation guides
- Enhanced targeting options with advanced user targeting, beacon region targeting, and location authorization targeting
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
docs/sdk/ios.mdx | Added user tags API documentation with Swift and Objective-C code examples |
docs/sdk/android.mdx | Added user tags API documentation with Java and Kotlin code examples |
docs/campaigns.mdx | Major overhaul including new campaign types, targeting options, analytics setup, and deep linking configuration |
Comments suppressed due to low confidence (2)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
##### iOS | ||
|
||
``` swift | ||
class MyRadarInAppMessageDelegate : NSObject, RadarInAppMessageProtocol { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be
class MyRadarInAppMessageDelegate : RadarInAppMessageDelegate {
// Called when the CTA button is clicked by the user. Default behavior open configured deeplink, override to implement custom behavior
override func onInAppMessageButtonClicked(_ message: RadarInAppMessage) {
...
}
// Called when the dismiss button is clicked by the user. Override to implement custom behavior
override 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
override func onNewInAppMessage(_ message: RadarInAppMessage) -> RadarInAppMessageOperation {
...
}
// Called to create the in-app message view. Default behavior creates a view defined by Radar, override to create a custom view. (note: if a custom view is used, the dashboard preview will not be accurate)
override func createInAppMessageView(_ message: RadarInAppMessage, onDismiss: @escaping () -> Void, onInAppMessageClicked: @escaping () -> Void, completionHandler: @escaping (UIViewController) -> Void) {
...
completionHandler(viewController)
}
}
and we can probably make this a code tab, and include ObjC as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ObjC:
// .h file
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "RadarSDK/RadarInAppMessageDelegate.h"
// The member methods can be optionally defined to use custom behavior, or left out to use default behaviour
@interface MyObjC_IAMDelegate : RadarInAppMessageDelegate
// Called when the CTA button is clicked by the user. Default behavior open configured deeplink, define this function to override default and implement custom behavior
- (void)onInAppMessageButtonClicked:(RadarInAppMessage * _Nonnull)message;
// Called when the dismiss button is clicked by the user. Override to implement custom behavior
- (void)onInAppMessageDismissed:(RadarInAppMessage *)message;
// Called just before the SDK displays the in app message. The return values decides if the in app message is displayed or discarded
- (RadarInAppMessageOperation)onNewInAppMessage:(RadarInAppMessage *)message;
// Called to create the in-app message view. Default behavior creates a view defined by Radar, override to create a custom view. (note: if a custom view is used, the dashboard preview will not be accurate)
- (void)getIAMViewController:(RadarInAppMessage * _Nonnull)message completionHandler:(void (^)(UIViewController *))completionHandler;
@end
// .m file
@implementation MyObjC_IAMDelegate
- (void)onInAppMessageButtonClicked:(RadarInAppMessage *)message {
}
- (void)onInAppMessageDismissed:(RadarInAppMessage *)message {
}
- (RadarInAppMessageOperation)onNewInAppMessage:(RadarInAppMessage *)message {
return RadarInAppMessageShow; // or RadarInAppMessageIgnore
}
- (void)getIAMViewController:(RadarInAppMessage * _Nonnull)message completionHandler:(void (^__strong)(UIViewController *__strong))completionHandler {
}
@end
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should inherit from RadarInAppMessageDelegate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need some changes on the prefered way to use RadarInAppMessageDelegate, I've provided the code snippets for swift and ObjC, I think we should also use the tab items for the In app messaging section.
Besides that, other changes looks good.
@@ -22,61 +22,227 @@ 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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we changing this to code snippets?
|
||
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's link to the docs instead: https://docs.radar.com/beacons
|
||
## Campaign types | ||
|
||
### Client side geofence | ||
### Client side geofence (iOS only) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want a section "Client-side notifications (iOS only)" with subsections for geofence/place and then for beacon based
|
||
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clientside beacon are ios only and belong above. but there's beacon event notifications that fit here
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You say "no additional code is required" and then present a bunch of code snippets. Give an intro to life cycle hooks and when someone would want to use them
} | ||
``` | ||
|
||
#### Custom in app messages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Custom styling"?
The campaign docs are quite stale, pulling in elements from the following PRs to create a consolidated PR for our new campaign offerings.
What?
Why?
How?
Screenshots (optional)
Anything Else? (optional)