Follow

FAQs for Developers

FAQs for Developers

General

Why do user credentials need to be unique across all users?

The Kahuna platform can track people who use your application, in addition to devices. If a username or other user credential is not globally unique across all your users, Kahuna combines two entirely separate users into one. In this case, Kahuna recommends you set the non-unique credential as an attribute instead.

Related Topics Link IconRelated Topics

Do I need to send a unique ID for a user that is using my app anonymously?

You do not need to generate a Unique Identifier for a user that has not logged in but is using your app anonymously. The SDK generates a Unique Identifier for the user's device to keep track of your user's behavior. When the user decides to log in or register, the Kahuna platform automatically combines the user's previous history and associates those events to the newly logged in user.

Related Topics Link IconRelated Topics

How do I add credentials for an existing user?

To add a user credential for an existing user after the user logs in:

  1. Create a new user credentials object.
  2. Add the new credential to the object.
  3. Log in again and provide the new object.

To add credentials for a logged out user, log in the user before adding credentials.

To add credentials for an anonymous user, follow the instructions in Set Up User Credentials for your platform. If you have sent a login event to Kahuna, but you have not sent user credentials, the user of the device is anonymous. You still have to add credentials for the user.

How do I remove user credentials from a device?

To remove user credentials, log out to signal to the server that the user is no longer using the device. By logging out, you clear cached user credentials and user attributes from the device. The server can then track the device as an anonymous user until you provide new user credentials.

You also need to log out before another user logs in on the same device with different user credentials. Otherwise, Kahuna sees two users with common credentials (the device ID) and merges the data. In some cases, a single person can log in multiple times with different emails. Always check with the user before doing a login with different credentials on the same device.

Seeing top users with many credentials might indicate a problem with user merging.

How can I change the app name in the push notification?

For iOS, the name of the app displayed in the push notification is taken from the bundleID of the app. For Android, the name is the name listed as the name element in the application tag of the manifest file.

What characters does Kahuna support in event and attribute names?

Kahuna supports letters, numbers, spaces, dashes, and underscores. However, you cannot begin an event or attribute name with a number or include special characters, such as $, &, #.

How can I be sure that my data is in sync and up-to-date?

The SDK ensures that data is up-to-date and in sync by tracking relevant events and attributes for each user; it sends events used for conversion campaigns in real time and batches other events. If network connectivity is lost, the SDK sends batches as soon as it regains connectivity.

What's the difference between the sandbox and production accounts?

The sandbox account is used for development builds while the production account is used for ad-hoc or distribution builds. The sandbox account includes additional testing tools.

The Kahuna SDKs for iOS and Android automatically detect the build type and direct traffic to the appropriate account. For iOS, the SDK sends traffic from builds provisioned for the Development APS environment to the sandbox account and traffic from builds provisioned for the Production APS environment to the production account. For Android, all traffic from builds signed with the debug keystore goes to the sandbox account and all other traffic goes to the production account.

For JavaScript, you specify the account (production or sandbox) when you integrate the Kahuna SDK with your app.

Related Topics Link IconRelated Topics

How can I make sure the SDK is always up to date?

Kahuna provides automated updating for iOS using cocoa pods and automated updating for Web SDK deployments if linked directly to our Production content delivery mechanism.

For Android, replace a jar file as needed. Kahuna sends automated console messages to alert you when there is an opportunity to upgrade.

For upgrade documentation, contact Customer Success.

Why don't I see the Push Authorization section on the Configuration tab of the Settings page?

You see the Push Authorization section only if you are a Kahuna administrator (you have Manage User privileges). Either ask your Kahuna administrator to upload the certificate for you or send the certificate to support@kahuna.com.

Does Kahuna support deep linking?

Kahuna supports deep linking in push notifications and in-app messages for iOS and Android.

  • In push notifications or Custom In-App messages, you can include a deep link using key-value pairs, which are sent to your app through the Kahuna SDK, although the key-value pairs do not show in the notification itself. Kahuna allows you to send a different key-value pair to each individual user. To effectively use deep linking, you need to coordinate the use of your key-value pairs between the marketers who create the notifications and the developers who maintain your app. Both groups need to understand what data is available for users, what data is sent from Kahuna during a campaign, and how the data must be handled in the mobile app.
  • For Marketer-Driven In-App messages, you can include a deep link either using a URL to direct users to a particular web page or using your app's URL scheme to create a personalized view of your app when the user clicks on the message. You need to coordinate the use of your app's URL scheme between the marketers who create the in-app messages and the developers who maintain your app.

The data you send with deep linking is limited by the total size of your notification.

Which SDK versions support rich content in push notifications?

Kahuna supports rich content in push notifications for iOS and Android.

  • For iOS 10 apps, you can send push notifications with titles, images, gifs, and videos. For iOS 8 and above, you can use actionable buttons in your push notifications.

  • For Android apps running version 4.0 and above (Ice Cream Sandwich), you can send push notifications with titles, images, and actionable buttons.

Note: Currently, you can use actionable buttons only when sending push notifications from the Push API.

Note: To support push notifications with attached media, your iOS app must be integrated with the Kahuna SDK for iOS 2.5.0 or higher. Your Android app must be integrated with the Kahuna SDK for Android 2.0.0 or higher.

How do I test push notifications with the Kahuna platform?

To integrate the Kahuna SDK and set up push notifications successfully, follow the steps below.

Make sure that you follow these steps before you go live in the app store.

  1. Prepare your device for testing:
    1. Open the Kahuna Integration tools. On the Integration Test page for your platform, click Find My Device and follow the instructions provided to find your test device.
    2. In the top bar of the Kahuna application, paste your device ID into the Search for people area to open the mini profile that includes the device ID.
  2. Send a push notification from Kahuna:
    1. Follow the SDK integration procedure for your platform (iOS, Android, Cordova/PhoneGap).
    2. Allow push notifications for your app on the test device.
    3. Open your app, then background the app to flush the SDK. This triggers the k_push_enabled event from the SDK.
    4. From the Kahuna mini profile, send a push notification. Check that your test device receives the notification.
    5. From the Kahuna mini profile, send a ghost push notification. Check that your test device does not receive the notification.
  3. Disable push notifications:
    1. On your test device, disable push notifications from the device Settings.
    2. From the Kahuna mini profile, send a push notification. Check that your test device does not receive the notification.
  4. Re-enable push notifications:
    1. On your test device, re-enable push notifications from the device Settings.
    2. Open your app, then background the app to flush the SDK. This triggers the k_push_enabled event from the SDK.
    3. From the Kahuna mini profile, send a push notification. Check that your test device receives the notification.
How do I open a web page from a push notification?
 Detailed instructions can be found here: https://support.kahuna.com/hc/en-us/articles/360008988593

iOS

Why do I need to pass in username, email, or other user credentials when I call launchWithKey?

Kahuna requests user credentials for your app when you call launchWithKey in case a user is already logged into your app and then upgrades to a version that contains the Kahuna SDK. In this case, the user has logged in and set their credentials already. Kahuna wants to receive credentials for these users when they upgrade. If the SDK already has the credentials, Kahuna does not send anything to the servers because nothing has changed.

Why do I need to pass in user credentials when a user logs in or registers if set in application:didFinishLaunchingWithOptions?

Kahuna wants you to send user credentials for your app when your user logs in or registers to get that information to our servers as soon as possible. Otherwise, you need to wait until the next app launch before Kahuna obtains any user credentials.

What information does the Kahuna SDK for iOS capture automatically?

The Kahuna SDK for iOS collects the following information.

  • Device language (located in Language & Region under General Settings on the device)
  • Device time zone (the two-letter abbreviation)
  • Device type (for example, iPhone6,1)
  • Application name (CFBundleDisplayName)
  • Application version (CFBundleShortVersionString or CFBundleVersion whichever is available in that order)
  • OS version
  • Current badge on the app
  • Application Bundle ID (CFBundleIdentifier)
  • Current epoch time on the device
Why is my custom in-app message not showing?

After receiving an in-app message, the SDK attempts to call your delegate so that you can display your own UIView or a customized version of KahunaInAppMessageView to your user. If you do not have a delegate set, the SDK keeps the in-app message for two hours and continues checking for a delegate every time your app comes to the foreground.

Kahuna leverages the existing batching mechanism within the SDK to send any pending in-app message for the end user. The Kahuna server controls SDK batching according to the campaign type so that some events are given higher priority than others.

Can I customize how Marketer-Driven In-App Messages are displayed?

With the Kahuna SDK for iOS 2.5.4 and above, you can customize how Marketer-Driven In-App Messages are displayed by implementing the kahunaSdkTemplateInAppMessageReceived KahunaDelegate method together with the + (void) displayPendingSdkTemplateInAppMessage; method.

  1. Implement the kahunaSdkTemplateInAppMessageReceived KahunaDelegate method.

    This method is invoked when the Kahuna SDK receives a Marketer-Driven In-App Message, at which point the SDK defers displaying the in-app message until the displayPendingSdkTemplateInAppMessage method is invoked (see below).

  2. Call the displayPendingSdkTemplateInAppMessage method when your app is ready to display the in-app message.

Android

Why do I need to pass in username, email, or other user credentials in my Application.onCreate() method?

Kahuna requests user credentials for your app immediately after you call Application.onCreate() in case a user is already logged into your app and then upgrades to a version that contains the Kahuna SDK. In this case, the user has logged in and set their credentials already. Kahuna wants to receive credentials for these users when they upgrade. If the SDK already has the credentials, Kahuna does not send anything to the servers because nothing has changed.

Why do I need to pass in user credentials when a user logs in or registers if already set in Application.onCreate() method?

Kahuna wants you to send user credentials for your app when your user logs in or registers to get that information to our servers as soon as possible. Otherwise, you need to wait until the next app launch before Kahuna obtains any user credentials.

What information does the Kahuna SDK for Android capture automatically?

The Kahuna SDK for Android collects the following information.

  • Device Language
  • Device time zone (two-letter abbreviation)
  • Device type (Build.MODEL)
  • Application name (ApplicationInfo.labelRes)
  • Application version (PackageInfo.versionName)
  • OS version (Build.VERSION.RELEASE)
  • Current epoch time on the device
Can I customize how Marketer-Driven In-App Messages are displayed?

With the Kahuna SDK for Android 3.0.1 and above, you can customize how Marketer-Driven In-App Messages are displayed by implementing the KahunaSDKTemplateInAppMessageListener interface and then passing your class instance to the registerSDKTemplateInAppMessageListener(KahunaSDKTemplateInAppMessageListener sdkTemplateInAppMessageListener) method.

Follow the steps below.

  1. Create your own implementation of the KahunaSDKTemplateInAppMessageListener interface.

  2. Register your listener class with the registerSDKTemplateInAppMessageListener method.

  3. When the Kahuna SDK receives a Marketer-Driven In-App Message, it calls the onSDKTemplateInAppMessageReceived() method in your KahunaSDKTemplateInAppMessageListener class. When your app is ready to display the in-app message, call the displayPendingSDKTemplateInAppMessage() method.
  4. If you no longer want to customize how Marketer-Driven In-App Messages are displayed, call unregisterSDKTemplateInAppMessageListener().

Cordova/PhoneGap

Why do I need to pass in username, email, or other user credentials in my onDeviceReady method?

Kahuna requests user credentials for your app when you call launchWithKey in case a user is already logged into your app and then upgrades to a version that contains the Kahuna SDK. In this case, the user has logged in and set their credentials already. Kahuna wants to receive credentials for these users when they upgrade. If the SDK already has the credentials, Kahuna does not send anything to the servers because nothing has changed.

Why do I need to pass in user credentials when a user logs in or registers if already set in onDeviceReady?

Kahuna wants you to send user credentials for your app when your user logs in or registers to get that information to our servers as soon as possible. Otherwise, you need to wait until the next app launch before Kahuna obtains any user credentials

JavaScript

How are language and timezone settings determined in a login event?

The timezone is determined by the JavaScript clock on the web client and the language is the two-letter language code of the web page display (this might be different from the user's preferred language).

Note: If your web page does not provide a lang attribute on the HTML element, Kahuna does not send the language in the login event.

Which Kahuna SDK supports web push notifications?

Kahuna JavaScript SDK 2.2.4 or later supports web push. After minimal developer setup, your marketers will be able to create web push notifications for your website in addition to mobile push notifications for your apps. See Set Up Web Push Messaging.

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments