Oracle Help Center | Oracle Responsys Mobile App Platform Cloud Service title

Cross-channel Conversion Tracking

About Cross-channel Conversion Tracking

Conversion tracking enables marketers using Responsys to evaluate how effective their marketing campaign is in driving a particular post-clickthrough action, such as making a purchase. With the Cross-Channel Conversion Tracking feature, Responsys extends its conversion tracking functionality, so that marketers can attribute conversions that occur in your mobile app to an email campaign.

For example, consider a 'freemium' health and fitness mobile app that monetizes by having customers upgrade to a 'premium' version. The company sends email campaigns to customers to highlight the benefits of the premium service and then routes them to their mobile app, where customers are prompted to upgrade. When the customer does upgrade, this upgrade is then tied back to the email campaign that prompted the upgrade.

How Cross-channel Conversion Tracking works

For Cross-Channel Conversion Tracking to work, Marketers create email campaigns that contain deep-linked URLs to their organization’s mobile app. The mobile app must be configured to record the click, wait for the conversion action, and then send the conversion to Responsys. With this feature, conversions on email campaigns (via deep linked URLs to mobile apps) that happen on a mobile app are now attributed to the email campaign. Marketers can view these conversion metrics in Interactive Dashboards, using the Browser Types report for the email campaign.

 

Modifying your mobile app code to support Cross-channel Conversion Tracking

As the Mobile App Developer, you must update your organization’s mobile app to be able to pass the conversion events from the app, along with the relevant session information, to the Responsys listener (also knows as the Response Handler). Responsys uses the session information to attribute the conversion to the email campaign.

This topic provides the steps for those who would like to link from a Responsys email campaign directly into their iOS mobile app (if installed). The following section details out the Implement Resolver Code in your iOS App.

NOTES:

Before you begin

Set Conversion URL and RIAppID

Copy the conversionUrl and riAppId values from config.json. Provide those values to the SDK by calling following method from application:didFinishLaunchingWithOptions:. In the following snippet, substitute conversionUrl_value and riAppID_value with the values from the config.json file:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [[PushIOManager sharedInstance] setConversionURL:[NSURL URLWithString:@"conversionUrl_value"]; 
    [[PushIOManager sharedInstance] setRIAppID:@"riAppID_value"]; 
}
        
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
        PushIOManager.sharedInstance().setConversionURL(URL.init(string: "conversionUrl_value"))
        PushIOManager.sharedInstance().setRIAppID("riAppID_value")
}
        

Override application:continueUserActivity:restorationHandler:

When you tap on the link into your email (with universal link set-up) and it invokes your application, application needs to override application:continueUserActivity to let the SDK know the required information.

- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *))restorationHandler {
    [[PushIOManager sharedInstance] continueUserActivity:userActivity restorationHandler:restorationHandler];
    return YES;
}
        
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
        PushIOManager.sharedInstance().continue(userActivity, restorationHandler: restorationHandler)
        return true
}
        

The mobile app must let the SDK know if the app needs to be notified with the resolved destination URLs. Call the following method from application:didFinishLaunchingWithOptions:.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [[PushIOManager sharedInstance] setExecuteRsysWebURL:YES];
}
        
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
    PushIOManager.sharedInstance().executeRsysWebURL = true
}
        

Add Listener for Destination URLs

When the SDK receives the destination URLs from server, it broadcast the PIORsysWebURLResolvedNotification notification. The mobile app must listen to the notification PIORsysWebURLResolvedNotification and use the resolved destination URLs. The mobile app should add the notification listener no later than the application:didFinishLaunchingWithOptions: method.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(resolvedURL:) name:PIORsysWebURLResolvedNotification object:nil];
}
//SDK will broadcast the notification with resolved info (dictionary). Application needs to extract the relevant information as following:
-(void)resolvedURL:(NSNotification *)notification{
    NSString *deeplinkURL = notification.userInfo[PIOResolvedDeeplinkURL];
    NSString *weblinkURL = notification.userInfo[PIOResolvedWeblinkURL];
    NSString *requestURL = notification.userInfo[PIORequestedWebURL];
    BOOL isPubwebURLType = [notification.userInfo[PIORequestedWebURLIsPubWebType] boolValue];
    NSError *error = notification.userInfo[PIOErrorResolveWebURL];
}
        
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
        NotificationCenter.default.addObserver(self, selector: #selector(self.resolvedURL), name:NSNotification.Name.PIORsysWebURLResolved, object: nil)
}
//SDK will broadcast the notification with resolved info (dictionary). Application needs to extract the relevant information as following:
func resolvedURL(notification:Notification)-> Void{
        if let userInfo = notification.userInfo{
           let deepLink = userInfo[PIOResolvedDeeplinkURL]
           let weblinkURL = userInfo[PIOResolvedWeblinkURL]
           let requestURL = userInfo[PIORequestedWebURL]
           let isPubwebURLType = userInfo[PIORequestedWebURLIsPubWebType]
           let error = userInfo[PIOErrorResolveWebURL]
        }
 
    }
        

 

Troubleshooting iOS issues with Conversion Tracking

General debugging

To get the error details printed into the Debugger/Organizer Console, you can set the LogLevelVerbose in your mobile app. This is described in the Debugging & Logging topic.

The mobile app is not recommended to make the same request to the SDK (in case of error/failure), as the mobile app may not have all the info again needed by the SDK.

Debugging errors that occur while resolving Response Handler information

If any error occurred while resolving the Response Handler information, it is passed in PIORsysWebURLResolvedNotification. The mobile app must extract the error to get the exact error details.

     - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

            [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(resolvedURL:) name:PIORsysWebURLResolvedNotification object:nil];
        }
        
        //SDK will broadcast the notification with resolved info (dictionary). Application needs to extract the relevant information as following:

        -(void)resolvedURL:(NSNotification *)notification{
            NSError *error = notification.userInfo[PIOErrorResolveWebURL];
            NSLog(@"Error: %@", error);
        }
        
     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {

            NotificationCenter.default.addObserver(self, selector: #selector(self.resolvedURL), name:NSNotification.Name.PIORsysWebURLResolved, object: nil)
        }

        func resolvedURL(notification:Notification)-> Void{
            if let userInfo = notification.userInfo{
               let error = userInfo[PIOErrorResolveWebURL]
            }
        }