Skip to main content

Tracking

Attach metadata via Web Chat widget.

Adding Tags to Conversations

You can attach tags while reporting an issue by passing them to the helpshiftConfig object at the time of initialization. You can pass an array of strings which will get added as Tags when the issue is created.

For example:

// Make this change to the embed code placed before the closing </body> tag.

window.helpshiftConfig = {
platformId: "<YOUR_APP_ID>",
domain: "<YOUR_DOMAIN>",
tags: ["foo", "bar"],
};
Note

On tag names & compatibility

  • Tags must be pre-created in the Helpshift Dashboard (Settings → Tags), otherwise they will be ignored.
  • The attached tags must exactly match the tags present on the dashboard.

Set Custom Issue Fields

If you want to set Custom Issue Fields at the time of Issue creation, use the following API. This API will merge these fields with previously set fields.

Helpshift("setCustomIssueFields", {
// Key of the Custom Issue Field
version: {
// Type of Custom Issue Field
type: "number",
// Value to set for Custom Issue Field
value: "10.0",
},
userInfo: {
// Type of Custom Issue Field
type: "singleline",
// Value to set for Custom Issue Field
value: "We have a new user!",
},
});

The following are the valid values for the type property of a Custom Issue Field.

  • singleline
  • multiline
  • number
  • checkbox
  • dropdown
  • date

Compatibility table for type and values:

TypeValueComments
singlelinestringCharacter limit of 255
multilinestringCharacter limit of 100,000
numberstring
dropdownstringDrop-down options should exist for the given Custom Issue Field
datenumberEpoch time. For example - Date.now()
checkboxboolean
Note
  • This API should be called before the Issue is created (i.e. before the Webchat launcher is clicked or the Open Widget API API is called). You won't be able to update Custom Issue Fields after the Issue is created.
  • If any of the keys, types or values are invalid, that particular Custom Issue Field will get dropped.

Replace Custom Issue Fields

If you want to clear previous Custom Issue Fields and set new fields, use the following API.

Helpshift("replaceCustomIssueFields", {
// Key of the Custom Issue Field
isMobile: {
// Type of Custom Issue Field
type: "checkbox",
// Value to set for Custom Issue Field
value: true,
},
browser: {
// Type of Custom Issue Field
type: "dropdown",
// Value to set for Custom Issue Field
value: "chrome",
},
});
Note

This API can be used when you want to navigate from one page to another and set different Custom Issue Fields for each page.

Tracking user-specific metadata

With the new Identity System - User Hub, we have introduced new APIs that allow you to track user-specific metadata via a simple Javascrip API. Please refer to the linked section for details.