capacitor-gleap-plugin-v4 v13.1.0
Capacitor Gleap Plugin
Gleap SDK for Capacitor is the easiest way to integrate Gleap into your Ionic apps! Achieve better app quality with comprehensive in-app bug reporting & customer feedback for your web-apps and websites. Many thanks to Stephan Nagel (congrapp) for his work on the Gleap capacitor plugin.
This plugin supports capacitor 5. See the instructions below for earlier capacitor versions.
Install
npm install capacitor-gleap-plugin
npx cap sync
Capacitor 4 or earlier
Please install the plugin version capacitor-gleap-plugin@10.0.3
if you are using capacitor 4 or earlier.
API
initialize(...)
identify(...)
clearIdentity()
getIdentity()
isUserIdentified()
log(...)
showSurvey(...)
attachCustomData(...)
setTags(...)
setCustomData(...)
removeCustomData(...)
clearCustomData()
trackEvent(...)
trackPage(...)
setEventCallback(...)
sendSilentCrashReport(...)
preFillForm(...)
addAttachment(...)
removeAllAttachments()
open()
openNews(...)
openNewsArticle(...)
openHelpCenter(...)
openHelpCenterArticle(...)
openHelpCenterCollection(...)
searchHelpCenter(...)
openFeatureRequests(...)
close()
isOpened()
startFeedbackFlow(...)
startClassicForm(...)
startConversation(...)
startBot(...)
showFeedbackButton(...)
setDisableInAppNotifications(...)
setLanguage(...)
disableConsoleLogOverwrite()
enableDebugConsoleLog()
- Interfaces
initialize(...)
initialize(options: { API_KEY: string; }) => Promise<{ initialized: boolean; }>
Initialize Gleap with an API key
Param | Type |
---|---|
options | { API_KEY: string; } |
Returns: Promise<{ initialized: boolean; }>
Since: 7.0.0
identify(...)
identify(options: { userId: string; userHash?: string; name?: string; email?: string; phone?: string; companyId?: string; companyName?: string; plan?: string; value?: number; customData?: Object; }) => Promise<{ identify: boolean; }>
Set user identity
Param | Type |
---|---|
options | { userId: string; userHash?: string; name?: string; email?: string; phone?: string; companyId?: string; companyName?: string; plan?: string; value?: number; customData?: Object; } |
Returns: Promise<{ identify: boolean; }>
Since: 7.0.0
clearIdentity()
clearIdentity() => Promise<{ clearIdentity: boolean; }>
Clear user identity
Returns: Promise<{ clearIdentity: boolean; }>
Since: 7.0.0
getIdentity()
getIdentity() => Promise<{ identity: { userId: string; name?: string; email?: string; phone?: string; value?: number; }; }>
Get the current user identity
Returns: Promise<{ identity: { userId: string; name?: string; email?: string; phone?: string; value?: number; }; }>
Since: 8.1.0
isUserIdentified()
isUserIdentified() => Promise<{ isUserIdentified: boolean; }>
User identified status.
Returns: Promise<{ isUserIdentified: boolean; }>
Since: 8.1.0
log(...)
log(options: { message: string; logLevel?: "ERROR" | "WARNING" | "INFO"; }) => Promise<{ logged: boolean; }>
Submit a custom log message with the given level
Param | Type |
---|---|
options | { message: string; logLevel?: "ERROR" | "WARNING" | "INFO"; } |
Returns: Promise<{ logged: boolean; }>
Since: 7.0.0
showSurvey(...)
showSurvey(options: { surveyId: string; format?: "survey" | "survey_full"; }) => Promise<{ opened: boolean; }>
Manually show a survey.
Param | Type |
---|---|
options | { surveyId: string; format?: "survey" | "survey_full"; } |
Returns: Promise<{ opened: boolean; }>
Since: 8.5.1
attachCustomData(...)
attachCustomData(options: { data: any; }) => Promise<{ attachedCustomData: boolean; }>
Add custom data
Param | Type |
---|---|
options | { data: any; } |
Returns: Promise<{ attachedCustomData: boolean; }>
Since: 7.0.0
setTags(...)
setTags(options: { tags: string[]; }) => Promise<{ tagsSet: boolean; }>
Set tags
Param | Type |
---|---|
options | { tags: string[]; } |
Returns: Promise<{ tagsSet: boolean; }>
Since: 8.6.0
setCustomData(...)
setCustomData(options: { key: string; value: string; }) => Promise<{ setCustomData: boolean; }>
Set custom data
Param | Type |
---|---|
options | { key: string; value: string; } |
Returns: Promise<{ setCustomData: boolean; }>
Since: 7.0.0
removeCustomData(...)
removeCustomData(options: { key: string; }) => Promise<{ removedCustomData: boolean; }>
Remove custom data by key
Param | Type |
---|---|
options | { key: string; } |
Returns: Promise<{ removedCustomData: boolean; }>
Since: 7.0.0
clearCustomData()
clearCustomData() => Promise<{ clearedCustomData: boolean; }>
Clear custom data
Returns: Promise<{ clearedCustomData: boolean; }>
Since: 7.0.0
trackEvent(...)
trackEvent(options: { name: string; data?: any; }) => Promise<{ loggedEvent: boolean; }>
Log event to Gleap
Param | Type |
---|---|
options | { name: string; data?: any; } |
Returns: Promise<{ loggedEvent: boolean; }>
Since: 8.0.0
trackPage(...)
trackPage(options: { pageName: string; }) => Promise<{ trackedPage: boolean; }>
Track a page view
Param | Type |
---|---|
options | { pageName: string; } |
Returns: Promise<{ trackedPage: boolean; }>
Since: 8.4.1
setEventCallback(...)
setEventCallback(callback: GleapEventCallback) => Promise<CallbackID>
Param | Type |
---|---|
callback | (name: string, data?: any) => void |
Returns: Promise<string>
Since: 7.0.0
sendSilentCrashReport(...)
sendSilentCrashReport(options: { description: string; severity?: "LOW" | "MEDIUM" | "HIGH"; dataExclusion?: { customData: Boolean; metaData: Boolean; attachments: Boolean; consoleLog: Boolean; networkLogs: Boolean; customEventLog: Boolean; screenshot: Boolean; replays: Boolean; }; }) => Promise<{ sentSilentBugReport: boolean; }>
Log event to Gleap
Param | Type |
---|---|
options | { description: string; severity?: "LOW" | "MEDIUM" | "HIGH"; dataExclusion?: { customData: Boolean; metaData: Boolean; attachments: Boolean; consoleLog: Boolean; networkLogs: Boolean; customEventLog: Boolean; screenshot: Boolean; replays: Boolean; }; } |
Returns: Promise<{ sentSilentBugReport: boolean; }>
Since: 7.0.0
preFillForm(...)
preFillForm(options: { data: any; }) => Promise<{ preFilledForm: boolean; }>
Prefills the widget's form data
Param | Type |
---|---|
options | { data: any; } |
Returns: Promise<{ preFilledForm: boolean; }>
Since: 7.0.0
addAttachment(...)
addAttachment(options: { base64data: string; name: string; }) => Promise<{ attachmentAdded: boolean; }>
Add attachment as bas64 string
Param | Type |
---|---|
options | { base64data: string; name: string; } |
Returns: Promise<{ attachmentAdded: boolean; }>
Since: 7.0.0
removeAllAttachments()
removeAllAttachments() => Promise<{ allAttachmentsRemoved: boolean; }>
All attachments removed
Returns: Promise<{ allAttachmentsRemoved: boolean; }>
Since: 7.0.0
open()
open() => Promise<{ openedWidget: boolean; }>
Open widget
Returns: Promise<{ openedWidget: boolean; }>
Since: 7.0.0
openNews(...)
openNews(options: { showBackButton?: boolean; }) => Promise<{ openedNews: boolean; }>
Open news
Param | Type |
---|---|
options | { showBackButton?: boolean; } |
Returns: Promise<{ openedNews: boolean; }>
Since: 8.4.0
openNewsArticle(...)
openNewsArticle(options: { articleId: string; showBackButton?: boolean; }) => Promise<{ opened: boolean; }>
Open news article
Param | Type |
---|---|
options | { articleId: string; showBackButton?: boolean; } |
Returns: Promise<{ opened: boolean; }>
Since: 8.4.0
openHelpCenter(...)
openHelpCenter(options: { showBackButton?: boolean; }) => Promise<{ opened: boolean; }>
Open help center
Param | Type |
---|---|
options | { showBackButton?: boolean; } |
Returns: Promise<{ opened: boolean; }>
Since: 8.4.0
openHelpCenterArticle(...)
openHelpCenterArticle(options: { articleId: string; showBackButton?: boolean; }) => Promise<{ opened: boolean; }>
Open help center article
Param | Type |
---|---|
options | { articleId: string; showBackButton?: boolean; } |
Returns: Promise<{ opened: boolean; }>
Since: 8.4.0
openHelpCenterCollection(...)
openHelpCenterCollection(options: { collectionId: string; showBackButton?: boolean; }) => Promise<{ opened: boolean; }>
Open help center collection
Param | Type |
---|---|
options | { collectionId: string; showBackButton?: boolean; } |
Returns: Promise<{ opened: boolean; }>
Since: 8.4.0
searchHelpCenter(...)
searchHelpCenter(options: { term: string; showBackButton?: boolean; }) => Promise<{ opened: boolean; }>
Search help center
Param | Type |
---|---|
options | { term: string; showBackButton?: boolean; } |
Returns: Promise<{ opened: boolean; }>
Since: 8.4.0
openFeatureRequests(...)
openFeatureRequests(options: { showBackButton?: boolean; }) => Promise<{ openedFeatureRequests: boolean; }>
Open feature requests
Param | Type |
---|---|
options | { showBackButton?: boolean; } |
Returns: Promise<{ openedFeatureRequests: boolean; }>
Since: 8.4.0
close()
close() => Promise<{ closedWidget: boolean; }>
Close widget
Returns: Promise<{ closedWidget: boolean; }>
Since: 7.0.0
isOpened()
isOpened() => Promise<{ isOpened: boolean; }>
Check widget status code
Returns: Promise<{ isOpened: boolean; }>
Since: 7.0.0
startFeedbackFlow(...)
startFeedbackFlow(options: { feedbackFlow?: string; showBackButton?: boolean; }) => Promise<{ startedFeedbackFlow: boolean; }>
Start feedback flow
Param | Type |
---|---|
options | { feedbackFlow?: string; showBackButton?: boolean; } |
Returns: Promise<{ startedFeedbackFlow: boolean; }>
Since: 7.0.0
startClassicForm(...)
startClassicForm(options: { formId?: string; showBackButton?: boolean; }) => Promise<{ classicFormStarted: boolean; }>
Start a classic form
Param | Type |
---|---|
options | { formId?: string; showBackButton?: boolean; } |
Returns: Promise<{ classicFormStarted: boolean; }>
Since: 13.1.0
startConversation(...)
startConversation(options: { showBackButton?: boolean; }) => Promise<{ conversationStarted: boolean; }>
Start a new conversation
Param | Type |
---|---|
options | { showBackButton?: boolean; } |
Returns: Promise<{ conversationStarted: boolean; }>
Since: 13.1.0
startBot(...)
startBot(options: { botId?: string; showBackButton?: boolean; }) => Promise<{ startedBot: boolean; }>
Start bot
Param | Type |
---|---|
options | { botId?: string; showBackButton?: boolean; } |
Returns: Promise<{ startedBot: boolean; }>
Since: 10.0.3
showFeedbackButton(...)
showFeedbackButton(options: { show?: boolean; }) => Promise<{ feedbackButtonShown: boolean; }>
Show or hide the feedback button.
Param | Type |
---|---|
options | { show?: boolean; } |
Returns: Promise<{ feedbackButtonShown: boolean; }>
Since: 8.0.0
setDisableInAppNotifications(...)
setDisableInAppNotifications(options: { disableInAppNotifications?: boolean; }) => Promise<{ inAppNotificationsDisabled: boolean; }>
Disable in app notifications.
Param | Type |
---|---|
options | { disableInAppNotifications?: boolean; } |
Returns: Promise<{ inAppNotificationsDisabled: boolean; }>
Since: 8.6.1
setLanguage(...)
setLanguage(options: { languageCode: string; }) => Promise<{ setLanguage: string; }>
Set Language
Param | Type |
---|---|
options | { languageCode: string; } |
Returns: Promise<{ setLanguage: string; }>
Since: 7.0.0
disableConsoleLogOverwrite()
disableConsoleLogOverwrite() => Promise<{ consoleLogDisabled: boolean; }>
Disable console log overwrite
Returns: Promise<{ consoleLogDisabled: boolean; }>
Since: 7.0.0
enableDebugConsoleLog()
enableDebugConsoleLog() => Promise<{ debugConsoleLogEnabled: boolean; }>
Enable debug console log
Returns: Promise<{ debugConsoleLogEnabled: boolean; }>
Since: 7.0.0
Interfaces
Object
Provides functionality common to all JavaScript objects.
Prop | Type | Description |
---|---|---|
constructor | Function | The initial value of Object.prototype.constructor is the standard built-in Object constructor. |
Method | Signature | Description |
---|---|---|
toString | () => string | Returns a string representation of an object. |
toLocaleString | () => string | Returns a date converted to a string using the current locale. |
valueOf | () => Object | Returns the primitive value of the specified object. |
hasOwnProperty | (v: PropertyKey) => boolean | Determines whether an object has a property with the specified name. |
isPrototypeOf | (v: Object) => boolean | Determines whether an object exists in another object's prototype chain. |
propertyIsEnumerable | (v: PropertyKey) => boolean | Determines whether a specified property is enumerable. |
Function
Creates a new function.
Prop | Type |
---|---|
prototype | any |
length | number |
arguments | any |
caller | Function |
Method | Signature | Description |
---|---|---|
apply | (this: Function, thisArg: any, argArray?: any) => any | Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. |
call | (this: Function, thisArg: any, ...argArray: any[]) => any | Calls a method of an object, substituting another object for the current object. |
bind | (this: Function, thisArg: any, ...argArray: any[]) => any | For a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters. |
toString | () => string | Returns a string representation of a function. |
Boolean
Method | Signature | Description |
---|---|---|
valueOf | () => boolean | Returns the primitive value of the specified object. |
4 months ago