Taking customer engagement to the next level with Helpshift SDK

Engaging with your Customers

As app developers, one of the most important aspect of making your app awesome is to constantly engage with your customers. To do this, developers need to understand their customers intricately. And this understanding will always come from data. The more data you have about your user's behaviour, the better you can engage with him. Let's consider a few cases -

Case 1

Imagine you want to have a Drip marketing campaign which will send messages to your users, specific number of days after the app is installed. In order for you to be able to do this, you need to know when every user first installs your app. And then you need a mechanism to send messages to all such users. With the new Helpshift SDK, you will be able to find and segment all such users and then target them with a continuously running campaign. All the data needed for this will be collected by the SDK automatically.

Case 2

Bringing users back in to the app is most critical for any app which wants to be successful. In order for a developer to do this, he needs to have data about when was the last time every user engaged with the app. Once that information is available, developer can start a continuous campaign which can send effective messages to the user. All the data required to achieve this will be collected by the Helpshift SDK automatically without the developer having to do any work.

Case 3

App ratings are the ultimate measure of an app's popularity and success. The more ratings an app will have, the more visible it becomes which will ultimately mean more customers. But asking your users to rate your app is a critical decision. You want to maximize the chances of the user actually taking the time to rate your app. In order to do this, you must target the users who are your most frequent users. People who use the app most frequently. To do this, you need to collect analytics data about app sessions from all your users. The new Helpshift SDK will do this automatically for you. Moreover, it will collate this information for you from all devices that a particular user will use.

Case 4

The most effective way to make customers happy is to give them what they want. And to do this, you need a system to get their feedback. The Helpshift SDK can help you target a specific group of people based on engagement metrics or even custom data which the app can collect about the user. Feedback coming from the users will be in the form of support tickets which can be acted upon via the Helpshift admin dashboard.

Case 5

So let's say you built an awesome new feature and rolled out the update. But how do you make sure your users know about it ? And furthermore, how do you get them to go and upgrade the apps ? You can easily do this if you have the right data, and the mechanism for creating a segment of users to target. You can even go ahead and add an FAQ which explains the feature in detail. This can be combined with a call to action for going to the App Store and updating the app which can ensure maximum visibility for all your features.

Automatically Collected Data

The Helpshift SDK will automatically collect information about a user's device. Any data will only be collected if the app has the required permissions. User engagement data like first usage, last seen, total engagement etc will also be collected automatically by the SDK.

Device information that the SDK may collect automatically

Device model
Operating system
Language code (ISO-639-1)
Country code (ISO-3166-1 Alpha-2)
Development platform ?{"ios", "android", "phonegap", "unity"}
Native Platform ?{"ios", "android"}
Mobile Carrier
Push Opt-In
Push token
IP address
App Version
Helpshift Platform ID
Helpshift Domain
Geo Location in Lat, Long

Data collected from developer

There is a vast amount of data which app developers already have about an app's user. Meta-data like, what level he is currently on in a game, how much has he spent in the app, what are his preferred brands. The list can be endless. The Helpshift SDK also provides APIs for the developer to send such information to our backend. This information can be further used to create segments of users who can be targeted with an effective campaign.

Data Collection APIs

To start collecting rich meta-data about your user, use the HelpshiftCocos2dxCampaigns::.addProperty APIs.

The HelpshiftCocos2dxCampaigns class has APIs for supporting strings, integers, long long, booleans and date types of data.

static bool addStringProperty(const char* key, const char* value);
static bool addIntegerProperty(const char* key, int value);
static bool addBooleanProperty(const char* key, bool value);
static bool addDateProperty(const char* key, double secondsSinceEpoch);
static bool addLongLongProperty(const char* key, long long value);
static void addProperties(cocos2d::ValueMap& properties);

For example

HelpshiftCocos2dxCampaigns::addStringProperty("some-skey", "some-new-value");
HelpshiftCocos2dxCampaigns::addIntegerProperty("some-ikey", 42);
HelpshiftCocos2dxCampaigns::addBooleanProperty("some-bkey", true);
struct timeval timeOfDay;
gettimeofday(&timeOfDay, NULL);
HelpshiftCocos2dxCampaigns::addDateProperty("some-dkey", timeOfDay.tv_sec);
HelpshiftCocos2dxCampaigns::addLongLongProperty("some-long-long-key", 9223372036854775807);

If you want to add multiple properties together, you can use the HelpshiftCocos2dxCampaigns::addProperties() API which takes a dictionary which represents the user meta-data in terms property-value pairs.

ValueMap meta;
meta["money-spent"] = "67";
meta["status"] = "Whale";

The Date and Long Long property should not be added using addProperties API, Use addDateProperty and addLongLongProperty APIs respectively for them.

User Management APIs

If your app allows users to log in to their accounts, you can pass along that login information to the Helpshift SDK. This will help us better identify each user. This can be further extended if your app supports multiple users too.

To send the login information to the Helpshift SDK, please use the static void login(const char *identifier, const char *name, const char *email); API. If you want to switch users from one to another, you can use the same API with different user credentials. If you allow a user to logout of your app, you can pass on that information to us by using the static void logout(); API.

If you want to only set the name and email of the current user, you can use the static void setNameAndEmail(const char *name, const char *email); API.

Notification API for Campaigns

To use the Campaigns feature effectively, please make sure you have integrated Push notifications for your Application. On Android, there are 2 important APIs which your Cocos2dx Android application should call to make sure that Helpshift is able to Push notifications to the user's device.

static void registerDeviceToken(const char *deviceToken);
static void handleRemoteNotification(cocos2d::ValueMap& notification);

Depending on the Push plugin that you use, you will have a callback function when the device receives a push notification packet from APNS. Inside that function, please check the origin field of the notification payload. If the value of that field is helpshift, please convert the notification to a ValueMap object and call the Helpshift handlePush API

ValueMap notification = convertNotificationToValueMap();

Campaigns session delegates

Applicable to Cocos2d-x versions 4.1.0 and above.


This delegate callback tracks when a Campaigns session starts in your app. It will get fired every time the Campaigns session starts.


If you want to keep track of when helpshift session ends in your app, you can implement this delegate callback. The delegate will get fired every time the Helpshift session ends.

For example:

void helpshiftCampaignsSessionHasBegun() 
    // your code here

void helpshiftCampaignsSessionHasEnded() {
    // your code here
HelpshiftCocos2dxCampaigns::registerCampaignsSessionDelegates(helpshiftCampaignsSessionHasBegun, helpshiftCampaignsSessionHasEnded);

Inbox APIs

Starting from version 1.2.0 the Helpshift Cocos2d-x plugin now supports rich in-app Campaign messages. These messages can contain detailed text and cover images along with customized Action buttons. All of these messages are collated in an Inbox which is provided by the Helpshift SDK out of the box. To enable the user to access his Inbox, please use the static void showInbox(); API.


You can use the static void showInbox(); API to show a list of In-app Campaign messages that have been received by the user.

static void showInbox();

Example Code:

void GameSettingsScene::menuInboxCallback(CCObject* pSender) {


If you want to display badging inside your application to indicate to the user that he has unread Campaign messages, you can use the static void requestUnreadCampaignsMessagesCount(void (*unreadCampaignsMessagesCountHandler)(int count)); API which will return the current count of unread campaign messages in the user's Inbox.

Example Code:

void unreadCampaignsMessageCountHandler(int cnt) {
    printf("Unread campaigns message count: %d\n", cnt);



There are some guidelines which app developers need to follow to use the Campaigns product.

Limit on custom user properties

Currently there is a limit to the number of custom user properties which a developer can register for a given app.

Changes to the same property's value do not count as another property. This limitation applies to the unique keys which can be set.

The limit is 50 including the name and email properties if they are set for a given user.

Allowed values for custom user properties

The keys used for custom properties are restricted to having only alphanumeric characters. The only special characters allowed are "-" and "_", and those also need to be surrounded by alphanumeric characters. Please note that any unicode character is valid.

Examples of valid keys

  1. "level"
  2. "user-category"
  3. "is_pro"

Examples of invalid keys

  1. "$-spent"
  2. "-level-"

For iOS 9 and above, developers need to whitelist the URL Schemes which their App will query.

You must whitelist any URL Schemes that your App wants to query in your Info.plist file under the LSApplicationQueriesSchemes key:

This will Also impact the apps the apps which are not built with the iOS 9 SDK.