Attach metadata via Web Chat widget.
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"] };
On tag names & compatibility
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.
Compatibility table for type and values:
Type | Value | Comments |
---|---|---|
singleline | string | Character limit of 255 |
multiline | string | Character limit of 100,000 |
number | string | |
dropdown | string | Drop-down options should exist for the given Custom Issue Field |
date | number | Epoch time. For example - Date.now() |
checkbox | boolean |
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" } });
This API can be used when you want to navigate from one page to another and set different Custom Issue Fields for each page.