Support Home > SDK Integration > SDK – KochavaTracker > Integration Topic – Push Notifications

Integration Topic – Push Notifications

  • Integration Topic

    Push Notifications

    Integrate your app with Kochava’s Push Notifications Service.

    NOTE: To track uninstalls you will need to go through the integration process for Push Notifications.


    Overview

    The following builds upon Apple’s remote notifications capability, as outlined here. You can use Kochava’s Push Notifications Service to send remote notifications to your apps, as well as track app uninstalls and other analytics.


    Integration

    The following assumes that you have already integrated the KochavaTracker iOS/tvOS SDK.

    1. Add the Remote Notifications Device Token.
      For your instance of class KochavaTracker, call instance method addRemoteNotificationsDeviceToken(_:) and pass the device token provided by the operating system.

       

      Sample Code:

    2.  

    3. Send Push Opened Events.
    4. When your app is opened through a push notification, you may create and send an instance of class KochavaEvent to track that this occurred. The event type should be of type .pushOpened. The event payload should contain the response.notification.request.content.userInfo, so that the event can be attributed to a campaign. It is also recommended that you pass the response.actionIdentifier, so that you may track what action the user selected.

       

      Sample Code:

       

    5. Activate Push Notifications with Kochava.
    6. Push Notifications must be activated on your Kochava dashboard. From there you may also configure push notification campaigns. For more information refer to our Create/Edit Apps support documentation.

    7. Optionally clear your application icon badge number.
    8. On your Kochava dashboard you may indicate that you want the application icon badge number set when push notifications are sent. If you enable this option you should be prepared to clear your badge number when your application becomes active, or at some other appropriate time. For more information see instance property applicationIconBadgeNumber.

    See Also

    Related Symbols func addRemoteNotificationsDeviceToken(_:)

    Add a remote notifications device token.

    func removeRemoteNotificationsDeviceToken(_:)

    Remove a remote notifications device token.

    class KochavaEvent

    The class KochavaEvent provides a means of defining the parameters for a post-install event, providing standardized types and key names.

    func send(KochavaEvent)

    Send an instance of class KochavaEvent to the Kochava Server.

    External Documentation Apple Local and Remote Notifications Overview

    Local notifications and remote notifications are ways to inform users when new data becomes available for your app, even when your app is not running in the foreground. For example, a messaging app might let the user know when a new message has arrived, and a calendar app might inform the user of an upcoming appointment.

  • Integration Topic

    Push Notifications

    Integrate your app with Kochava’s Push Notifications Service.

    NOTE: To track uninstalls you will need to go through the integration process for Push Notifications.


    Overview

    The following builds upon Apple’s remote notifications capability, as outlined here. You can use Kochava’s Push Notifications Service to send remote notifications to your apps, as well as track app uninstalls and other analytics.


    Integration

    The following assumes that you have already integrated the KochavaTracker iOS/tvOS SDK.

    1. Add the Remote Notifications Device Token.
      For your instance of class KochavaTracker, call instance method addRemoteNotificationsDeviceToken: and pass the device token provided by the operating system.

      Sample Code:

    2.  

    3. Send Push Opened Events.
    4. When your app is opened through a push notification, you may create and send an instance of class KochavaEvent to track that this occurred. The event type should be of type KochavaEventTypeEnumPushOpened. The event payload should contain the response.notification.request.content.userInfo, so that the event can be attributed to a campaign. It is also recommended that you pass the response.actionIdentifier, so that you may track what action the user selected.

       

      Sample Code:

       

    5. Activate Push Notifications with Kochava.
    6. Push Notifications must be activated on your Kochava dashboard. From there you may also configure push notification campaigns. For more information refer to our Create/Edit Apps support documentation.

    7. Optionally clear your application icon badge number.
      On your Kochava dashboard you may indicate that you want the application icon badge number set when push notifications are sent. If you enable this option you should be prepared to clear your badge number when your application becomes active, or at some other appropriate time. For more information see instance instance property applicationIconBadgeNumber.

    See Also

    Related Symbols addRemoteNotificationsDeviceToken:

    Add a remote notifications device token.

    removeRemoteNotificationsDeviceToken:

    Remove a remote notifications device token.

    class KochavaEvent

    The class KochavaEvent provides a means of defining the parameters for a post-install event, providing standardized types and key names.

    sendEvent:

    Sends an instance of class KochavaEvent to the Kochava Server.

    External Documentation Apple Local and Remote Notifications Overview

    Local notifications and remote notifications are ways to inform users when new data becomes available for your app, even when your app is not running in the foreground. For example, a messaging app might let the user know when a new message has arrived, and a calendar app might inform the user of an upcoming appointment.

 
 

Last Modified: Jul 12, 2018 at 4:09 pm