Kochava is a leading mobile measurement and app analytics platform that offers unique dynamic deep linking, audience segmenting and data accessibility features for your business.
Find the open source transformer code for this destination in the GitHub repository.
Once you have confirmed that the source platform supports sending events to Kochava, follow these steps:
From your RudderStack dashboard, add a source. Then, from the list of destinations, select Kochava.
Assign a name to the destination and click Continue.
Connection settings
To successfully configure Kochava as a destination, you will need to configure the following settings:
App GUID: Kochava generates a unique ID for your application called the App GUID. You can find this ID by going to your Kochava account and navigating to Apps & Assets > All Apps. You can then select your app to the view the App GUID.
The following two settings are applicable for iOS device mode only:
Enable AppTrackingTransparency (ATT): Enable this setting if you want to enable the AppTrackingTransparency feature provided by the Kochava iOS SDK.
Make sure to include the key NSUserTrackingUsageDescription in your info.plist along with a string value explaining why you are requesting authorization to track.
Enable skAdNetwork: Enable this setting if you want to enable the skAdNetwork feature provided by the Kochava iOS SDK.
Adding device mode integration
To add Kochava to your Android project and enable functionalities like push notifications, follow these steps :
Open your project level build.gradle file, and add the following:
In the above snippet, RudderStack captures all information related to the viewed screen, along with any additional info associated with that event. In Kochava, the above screen call is shown as “screen view Sample Screen Name “ along with the properties.
Configuring push notifications
Follow these steps to configure push notifications for Kochava for the platform of your choice:
Register push notifications for your Android device in the Kochava dashboard.
Add the following dependency in your project level build.gradle file inside the buildscript:
Next, add the following dependencies and plugin to your app level build.gradle file:
dependencies{// for push notifications
implementation'com.google.firebase:firebase-messaging:21.1.0'}applyplugin:'com.google.gms.google-services'
Place the google-services.json downloaded from the Firebase console into the root folder of your app.
Passing the new Push Token received from FCM to the Kochava SDK. For more information, look into the sample-kotlin app.
// Extending FirebaseMessagingService class
classMyFirebaseMessagingService:FirebaseMessagingService(){// The onNewToken callback fires whenever a new token is generated.
overridefunonNewToken(token:String){super.onNewToken(token)// Method to pass the push token to the Kochava native sdk
registeredForPushNotificationsWithFCMToken(token)}}
Add push notifications as a capability by navigating to Target > Signing & Capabilities of your app when opened in Xcode.
Enable Background Modes/Remote notifications by navigating to Targets > Your App > Capabilities > Background Modes and then check Remote notifications.
Register the push notifications for the iOS devices in your Kochava dashboard.
Add the following code in your app just after initializing RudderStack’s iOS SDK to register the push notifications.
#import <usernotifications>
// register for push notifications
UNUserNotificationCenter*center=[UNUserNotificationCentercurrentNotificationCenter];center.delegate=self;[centerrequestAuthorizationWithOptions:(UNAuthorizationOptionAlert|UNAuthorizationOptionSound|UNAuthorizationOptionBadge)completionHandler:^(BOOLgranted,NSError*_Nullableerror){if(granted){dispatch_async(dispatch_get_main_queue(),^(void){[[UIApplicationsharedApplication]registerForRemoteNotifications];});}}];
Add the below handlers to handle the tokens and push notifications accordingly:
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.