Follow

Set Up In-App Messaging

Set Up In-App Messaging

The Kahuna SDK for Cordova/PhoneGap provides support to allow you to send in-app messages to your users.

Note: SDK 2.4.0 and above provides Marketer-Driven In-App Messaging so that you can develop messages with unique content using one of several template styles provided by Kahuna. If you use Marketer-Driven In-App Messaging, no setup is required and you can skip this section; however, you must contact Customer Success to turn on this feature for your namespace. If your app already has an in-app message style that you want to keep, you can use Custom In-App Messaging, which requires the following setup.

To set up Custom In-App Messaging

  1. Implement the JavaScript callback function kahunaCallback in your index.js file. Add this function outside the app object.

    function kahunaCallback (payload) {
        var type = payload['type']; // For in-app messages this value will be inAppMessage
        var message = payload['message']; // The In-App message
        var extras = payload['extras']; //  parameters associated with the in-app
        if (type == 'inAppMessage') {
            alert ('in-app message ' + message + ' received');
        }
    };
  2. Register for the callback function as shown below.

    Kahuna.setKahunaCallback (kahunaCallback);

To track Custom In-App Messages (clicks, dismisses, displayed, and not displayed events) just like marketer-driven in-app messages, please also implement the events described on Configuring Kahuna Integration To Track Custom In-App Message Events.

After you complete the steps in this topic, your activity is ready to start receiving custom in-app messages from Kahuna. Now, follow the steps in Add Events and Attributes.

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

Comments