Track Push and In App Notifications Skip to end of metadata

Prev Next

Now that you have installed the Mapp Engage SDK and updated the AppConfig.plist, you can follow the next steps to implement the tracking of push and in-app notifications.

In order to track the receiving/opening of push notifications, you need to implement the Mapp Engage SDK delegate methods:

#import "AppoxeeSDK.h"
 
//at AppDelegate.h file add appoxee and appoxee notification delegate
@interface AppDelegate : UIResponder <UIApplicationDelegate, AppoxeeDelegate, AppoxeeNotificationDelegate>
// at AppDelegate.m file implement delegate methods
- (void)appoxee:(Appoxee *)appoxee handledRemoteNotification:(APXPushNotification *)pushNotification andIdentifer:(NSString *)actionIdentifier
//at AppDelegate file add appoxee and appoxee notification delegate
class AppDelegate: UIResponder, UIApplicationDelegate, AppoxeeNotificationDelegate, AppoxeeDelegate
/
//and method
func appoxee(_ appoxee: Appoxee, handledRemoteNotification pushNotification: APXPushNotification, andIdentifer actionIdentifier: String)

Next, For in-app notification tracking, you need to include tracking as follows:

#import "AppoxeeInappSDK.h"
 
//at AppDelegate.h file add appoxee inapp notification delegate
@interface AppDelegate : UIResponder <UIApplicationDelegate, AppoxeeDelegate, AppoxeeInappDelegate, AppoxeeNotificationDelegate>
 
// at AppDelegate.m file implement delegate methods
- (void)appoxeeInapp:(AppoxeeInapp *)appoxeeInapp didReceiveInappMessageWithIdentifier:(NSNumber *)identifier andMessageExtraData:(NSDictionary<NSString *,id> *)messageExtraData {
     
}
 
- (void)inAppCallFailedWithResponse:(NSString *)response andError:(NSError *)error {
     
}
 
- (void)didReceiveDeepLinkWithIdentifier:(NSNumber *)identifier withMessageString:(NSString *)message andTriggerEvent:(NSString *)triggerEvent {
     
}
 
- (void)didReceiveInBoxMessages:(NSArray *)messages {
     
}
 
- (void)didReceiveInBoxMessage:(APXInBoxMessage *)message {
     
}
// at AppDelegate file
class AppDelegate: UIResponder, UIApplicationDelegate, AppoxeeInappDelegate, AppoxeeNotificationDelegate
 
//methods
func appoxeeInapp(_ appoxeeInapp: AppoxeeInapp, didReceiveInappMessageWithIdentifier identifier: NSNumber, andMessageExtraData messageExtraData: [String : Any]?) {
    }
 
func inAppCallFailed(withResponse response: String?, andError error: Error?) {
     
  }
 
func didReceiveDeepLink(withIdentifier identifier: NSNumber, withMessageString message: String, andTriggerEvent triggerEvent: String) {
    }
 
 func didReceive(inBoxMessages messages: [Any]?) {
    }
 
  func didReceive(_ message: APXInBoxMessage?) {
    }