core/product-experience/gainsight.service.ts
A service to manage the Gainsight integration. It allows to load the tag and
Properties |
|
Methods |
Accessors |
constructor(document: Document, appState: AppStateService, options: OptionsService, cookieBannerService: CookieBannerService, userPreferencesService: UserPreferencesService, translateService: TranslateService)
|
|||||||||||||||||||||
Parameters :
|
Async canEditProductExperienceSettings |
canEditProductExperienceSettings()
|
Returns :
Promise<boolean>
|
Async getGainsightKey |
getGainsightKey()
|
Returns :
unknown
|
identify | ||||||||||||||||||
identify(user, tenant, instanceId, versionUI?, versionBE?)
|
||||||||||||||||||
Identifies the user/account at Gainsight.
Parameters :
Returns :
void
|
Async isGainsightPreferenceDisabledInUserPreferences | ||||||
isGainsightPreferenceDisabledInUserPreferences(preferenceName: string)
|
||||||
Parameters :
Returns :
Promise<boolean>
|
Async loadTag | ||||||||||||
loadTag(currentTenant, identify)
|
||||||||||||
Load the script tag and calls the identify function to start the tracking.
Parameters :
Returns :
any
|
setFunctionalCookie | ||||||
setFunctionalCookie(value: boolean)
|
||||||
Parameters :
Returns :
void
|
shouldLoadGainsightTag | ||||||||
shouldLoadGainsightTag(customProperties: ICustomProperties)
|
||||||||
Checks if the Gainsight's tag should be loaded. The decision to load Gainsight will depend on custom properties and functional cookies.
Parameters :
Returns :
boolean
|
switchKnowledgeHubBotVisibility | ||||||
switchKnowledgeHubBotVisibility(showGainsightBot: boolean)
|
||||||
Parameters :
Returns :
void
|
translateToEnglish | ||||||
translateToEnglish(textToTranslate: string)
|
||||||
Parameters :
Returns :
string
|
triggerEvent |
triggerEvent(eventName: string, props?: object)
|
Returns :
void
|
Readonly HIDE_GAINSIGHT_BOT_STYLE_ID |
Type : string
|
Default value : 'hide-gs-bot'
|
tagFunction$ |
Default value : new BehaviorSubject(null)
|
A subject that emits the tag function as soon as a new tag is set. |
Readonly USER_PREFERENCES_GAINSIGHT_BOT_KEY |
Type : string
|
Default value : 'gainsightBotEnabled'
|
Readonly USER_PREFERENCES_GAINSIGHT_KEY |
Type : string
|
Default value : 'gainsightEnabled'
|
tagFunction |
gettagFunction()
|
Returns the tag global function which can be used to identify user or add special events. |