Tracking Android

Track events and user actions when the user starts a new conversation. Attach custom metadata to every conversation started via the SDK.

Name and email

You can set the name and email for the user, using SetNameAndEmail. For example:

HelpshiftApi.HelpshiftCore.SetNameAndEmail("John", "");


The SDK prefills the previously used name and email in the new conversation screen. If you want to clear these prefilled fields, set both arguments to null.

HelpshiftApi.HelpshiftCore.SetNameAndEmail(null, null);

The name and email shows up in the issue's sidebar in the agent dashboard -


The users can change their name and email in the new conversation screen.

User Identifier

If you have an identification for your users, you can specify that as well using Login. For example:

HelpshiftApi.HelpshiftCore.Login("unique-user-id-746501", "John Doe", "");

This shows up in the issue's sidebar in the agent dashboard -


User identifier should always be unique for each user.

In issue sidebar in the agent dashboard, other issues by the same user are also matched using user identifier. So make sure it is unique for each user.


Multi Login

These APIs give developers the ability to allow multiple users to chat with agents on the same app

Logging in

You can login a user using Login API

The identifier uniquely identifies the user. Name and email are optional. It is the app developer's responsibility to make sure that the identifier is unique.

For example:

HelpshiftApi.HelpshiftCore.Login("unique-user-id-746501", "John Doe", "");

Logging out

The Logout API will logout the currently logged in user. After logout, Helpshift falls back to the default login.

For example:


Important notes

  • If you are passing in user-login dependent meta-data, please make sure you reset the meta-data through the Helpshift APIs when you change the login.
  • If you are using the LeaveBreadCrumb API to pass user login related crumbs, please make sure to call the ClearBreadCrumsbs API when you change the login.
  • After logout, user can still submit a new conversation, but it will be with the device credentials
  • If any of the helpshift screens is currently being shown in the app, then any login/logout attempt is ignored.
  • If login api is called with different user identifier, then it first logs out the currently logged in user and then logs in with this user identifier.
  • Use SetNameAndEmail only if Login is not being used.
  • If SetNameAndEmail is used when already logged in, then it will overwrite the logged in user name and email.
  • SetUserIdentifier does not relate to user login.
  • It is best to call login immediately when your app user logs in.

Debug logs

Optionally, if you want to send additional debug logs, use HelpshiftApi.HelpshiftLogger to log messages in all files where you have used Log statements. This will send your logs when a new issue is registered.


HelpshiftApi.HelpshiftLogger.e("AppLogTag", "Error Log message");
HelpshiftApi.HelpshiftLogger.d("AppLogTag", "Debug log message");

App usage

Breadcrumbs will help you track events or user actions and when user starts a new conversation, these breadcrumbs can be seen along with the conversation in the admin site. To leave breadcrumbs can use LeaveBreadCrumb. For example:

HelpshiftApi.HelpshiftSupport.LeaveBreadCrumb("Went to Preferences Screen");

Breadcrumbs will be collected within the set breadcrumb limit. This is set in the SDK Configurations section for app settings in the agent dashboard. Breadcrumbs are collected in a FIFO queue. If you want to clear the breadcrumbs queue, please use the ClearBreadCrumbs API call. For example:


Attaching metadata to reported issues

You can attach additional metadata to every new conversation started by the app user via two simple mechanisms provided by the SDK. This metadata can range from user-name, email etc to game scores, current game levels and any other data relevant to creating a suitable context to each new conversation.

In all the API calls which launch the Help section, you can add a meta-data dictionary in the config dictionary parameter using the HelpshiftApi.HelpshiftSupport.HSCUSTOMMETADATAKEY key. This meta-data will be sent along with the next reported issue. When the user exits out of the Help section this meta-data will be dropped in favor of the meta-data sent in the next Helpshift API call.

Attaching tags with metadata

On tag names & compatibility

  • Tags must be lowercase.
  • Please do ensure that the tags you send via meta data, are exact matches of tags that exist in the admin site.


Examples :

You can attach tags with metadata to every reported issue via a reserved constant key HelpshiftApi.HelpshiftSupport.HSTAGSKEY. This is used with the config dictionary as follows:

Dictionary<string, object> config = new Dictionary<string, object>();
config.Add(HelpshiftApi.HelpshiftSupport.HSTAGSKEY, new String[] {"Whale","feedback","paid user"});
Dictionary<string, object> configMap = new Dictionary<string, object>();

Attaching Custom Issue Fields to conversations

On Custom Issue Fields keys & compatibility

  • Applicable to SDK v2.5.0 & above.
  • Custom Issue Fields must be created in the Helpshift Dashboard (Settings -> Custom Issue Fields), otherwise they will be ignored. Read more here.

You can attach Custom Issue Fields to every new conversation started by the user. A Custom Issue Field should have a key, a data type, and a value. The SDK allows the addition of a dictionary of Custom Issue Fields by using the HelpshiftApi.HelpshiftSupport.HSCUSTOMISSUEFIELDKEY key to the config dictionary.

These Custom Issue Fields would be sent whenever a new issue is created.

Possible datatypes to be passed into the config are:

Type Comments
"sl" Single line string with character limit of 255
"ml" Multi line string with character limit of 100,000
"n" String representation of a number. For eg. "12345"
"dd" Drop-down options should exist for the given Custom Issue Field on dashboard. Value should be one of the values specified on the dashbaord for that dropdown.
"dt" String representation of epoch time in milliseconds. For eg. "1505927361535"
"b" String representation of boolean. For eg. "true" or "false". This corresponds to the checkbox type custom issue field on dashboard.
Dictionary<string, object> configD = new Dictionary<string, object>();

Dictionary<string, string[]> customIssueFields = new Dictionary<string, string[]> ();
customIssueFields.Add ("join_date", new string[]{ "dt", "1505927361535" });
customIssueFields.Add ("level", new String[]{"n", "42"});
customIssueFields.Add ("name", new String[]{"sl", "John Doe"});
customIssueFields.Add ("address", new String[]{"ml", "3346, Sunny Glen Lane, Warrensville Heights, Ohio - 44128"});
customIssueFields.Add ("is_pro", new String[]{"b", "true"});
customIssueFields.Add ("currency", new String[]{"dd", "Dollar"});

configD.Add(HelpshiftApi.HelpshiftSupport.HSCUSTOMISSUEFIELDKEY, customIssueFields);

Check if there exists an active Conversation

Applicable to SDK v2.4.0 and above

This API determines if there is currently an ongoing Conversation in the SDK. You can use "HelpshiftApi.HelpshiftSupport.CheckIfConversationActive()" and implement Helpshift delegate DidCheckIfConversationActive method as shown below to get a boolean value that indicates whether there is an active Conversation open for the user. A Conversation is considered inactive when a user cannot respond with new messages on it.

For example:


You can implement the "DidCheckIfConversationActive" delegate method like the following example:

public class  HSDelegate : Com.Helpshift.Xamarin.Support.HelpshiftSupport.IDelegate {


    public void DidCheckIfConversationActive(bool isActive) {
    // your code here