Skip to main content

Guides

Classes

Guide

Guide type for presentable Guides provided for the Visitor on the current Page.

GuideStep

Step type representing specific, sequenced content to be displayed throughout a Guide's lifecycle.

Constants

defaultCssUrl : String

Readonly Property that provides the default CSS Url based on the customer's Apps configuration with Pendo.

guideSeenTimeoutLength : number

Readonly number that indicates how long a guide will try to show before sending an error. Defaults to 10 seconds.

Functions

areGuidesDelayed()boolean

Returns true or false if the client has delayed guides in the snippet or via a command

areGuidesDisabled()boolean

Returns true or false if the client has disabled guides in the snippet or via a command

findGuideById(id)Guide | null

Use this to search for a currently loaded guide by id.

findGuideByName(name)Guide | null

Use this to search for a currently loaded guide by name.

getActiveGuide()Object | null

If there is a Guide currently displayed then this will return an Object containing properties relevant to the current active Guide.

If no Guide is currently displayed then the return will be null.

The Object will contain:

getActiveGuides()Array.<Guide>

Returns an array of all guides available on the current page to the current user. If multiple frames on a pages, pendo.getActiveGuides() will return the list of eligible guides across all frames. If no frames, this will be the same as pendo.guides.

goToStep()

Advances from the currently displayed step of a guide to a specific step. This can be either before or after the current step.

hideGuides(hideOptions)

Manually hide any active Guides. An argument of an Object containing the property stayHidden set to true needs to be provided in order for the guides hidden to stay hidden.

initGuides()

Resets and starts guide loop

loadGuides()

Manually load guides for current visitor and URL. This is typically handled automatically by the Agent whenever the host Application changes its URL. In rare circumstances, a host Application may chose to force the load of Guides programmatically. One reason may be in order to get any guides designed for a visitor immediately after using a specific part of the Application that doesn't cause a URL change.

onGuideAdvanced()

Proceeds to the next step in a multi-step guide and sends a guideAdvanced event. Can advanced multiple steps or beyond a specific step by passing optional parameters. Lastly, sends a guideSeen event for the resulting displayed step.

onGuideDismissed()

Hides the current guide and invokes the guideDismissed event. Dismissed guides will not be re-displayed by default unless they have a recurrence setting or can be reactivated with an element. They can always be redisplayed via onGuideAdvanced or onGuidePrevious.

onGuidePrevious()

Proceeds to the previous step in a multi-step guide and sends a guideAdvanced event. Can rewind multiple steps or beyond a specific step by passing optional parameters. Lastly, sends a guideSeen event for the resulting displayed step.

onGuideSnoozed()

Snoozes the current guide. Guide will redisplay after snooze length, or default of one day. If another guide is eligible to be shown, it will show after snooze.

showGuideById(id, reason)

Activates the Guide for the given id, if loaded. If it is not in the payload, this function will return false.

showGuideByName(name, reason)

Activates the Guide for the given name, if loaded. If it is not in the payload, this function will return false.

startGuides()

Starts the process that loops over all currently loaded guides and determines what to show. Checks multistep guide continuation, auto-display guides, launcher guides, and badges.

stopGuides()

Clear any showing guides and prevent any loaded guides from rendering. Loaded guides remain in memory, so calling startGuides will work just fine after a stopGuides call.

Guide

Guide type for presentable Guides provided for the Visitor on the current Page.

Kind: global class
Category: Guides
Access: public

guide.canShow() ⇒ Boolean

Returns a Boolean value to indicate if the Guide can Show at this time.

Kind: instance method of Guide
Category: Guides
Access: public

guide.hide() ⇒ Boolean

Hides this Guide if it is being shown.

Kind: instance method of Guide
Category: Guides
Access: public
Example

guide.hide({stayHidden: true});

guide.show() ⇒ void

Attempt to show the Guide. The Guide will still honor any constraints like requiring a DOM element to be present if it was configured for that.

Kind: instance method of Guide
Category: Guides
Access: public

GuideStep

Step type representing specific, sequenced content to be displayed throughout a Guide's lifecycle.

Kind: global class
Category: Guides
Access: public

guideStep.advance() ⇒ void

Advances the Step to the next sibling Step of the parent Guide.

Kind: instance method of GuideStep
Category: Guides
Access: public

guideStep.attachEvent(element, type, fn) ⇒ void

Allows for an eventListener to be created that will automatically get cleaned up when this Step is torn down.

Kind: instance method of GuideStep
Category: Guides
Access: public

ParamTypeDescription
elementElementThe DOM element to attach the listener.
typeStringThe type of event: 'click', 'mousedown', 'keypress', etc...
fnfunctionA function that will be called when an event occurs of the specified type.

guideStep.canShow() ⇒ boolean

Returns a Boolean indicating if this Step can be shown.

Kind: instance method of GuideStep
Category: Guides
Access: public

guideStep.dismiss() ⇒ boolean

Dismisses the parent Guide which will hide this Step and prevent other Steps from showing.

Kind: instance method of GuideStep
Category: Guides
Access: public

guideStep.getGuide() ⇒ Guide

Returns the Step's parent Guide.

Kind: instance method of GuideStep
Category: Guides
Access: public

guideStep.hide() ⇒ void

Hides the Step if shown. Use an argument of an Object containing a key of stayHidden set to true to make sure to keep the Step hidden if the Guide it belongs to is designated as Automatically shown.

Kind: instance method of GuideStep
Category: Guides
Access: public
Example

step.hide({stayHidden: true});

guideStep.isShown() ⇒ boolean

Returns a Boolean indicating if this Step is being shown.

Kind: instance method of GuideStep
Category: Guides
Access: public

guideStep.show() ⇒ void

Attemps to show the step.

Kind: instance method of GuideStep
Category: Guides
Access: public

areGuidesDelayed() ⇒ boolean

Returns true or false if the client has delayed guides in the snippet or via a command

Kind: global function
Category: Guides
Access: public
Example

pendo.areGuidesDelayed() => true

areGuidesDisabled() ⇒ boolean

Returns true or false if the client has disabled guides in the snippet or via a command

Kind: global function
Category: Guides
Access: public
Example

pendo.areGuidesDisabled() => true

defaultCssUrl : String

Readonly Property that provides the default CSS Url based on the customer's Apps configuration with Pendo.

Kind: global constant
Category: Guides
Access: public
Example

pendo.defaultCssUrl

findGuideById(id) ⇒ Guide | null

Use this to search for a currently loaded guide by id.

Kind: global function
Returns: Guide | null - JSON guide object or null if no guide found
Category: Guides
Access: public

ParamTypeDescription
idstringid of the guide as a string

Example

pendo.findGuideById('guide_id')

findGuideByName(name) ⇒ Guide | null

Use this to search for a currently loaded guide by name.

Kind: global function
Returns: Guide | null - JSON guide object or null if no guide found
Category: Guides
Access: public

ParamTypeDescription
namestringname of the guide as a string

Example

pendo.findGuideByName('guide_name')

getActiveGuide() ⇒ Object | null

If there is a Guide currently displayed then this will return an Object containing properties relevant to the current active Guide.

If no Guide is currently displayed then the return will be null.

The Object will contain:

Kind: global function
Category: Guides
Access: public
Properties

NameTypeDescription
guideGuideThe Guide being displayed.
stepsArray.<GuideStep>All the child Steps in the Guide being shown.
stepGuideStepThe specific Step currently rendered for the Guide.
stepIndexNumberThe Step's position in the array of Steps.

getActiveGuides() ⇒ Array.<Guide>

Returns an array of all guides available on the current page to the current user. If multiple frames on a pages, pendo.getActiveGuides() will return the list of eligible guides across all frames. If no frames, this will be the same as pendo.guides.

Kind: global function
Category: Guides
Access: public
Example

pendo.getActiveGuides() => [{ Pendo Guide Object }, ...]

goToStep()

Advances from the currently displayed step of a guide to a specific step. This can be either before or after the current step.

Kind: global function
Category: Guides
Access: public
Example

pendo.goToStep({destinationStepId: "step_id"})

guideSeenTimeoutLength : number

Readonly number that indicates how long a guide will try to show before sending an error. Defaults to 10 seconds.

Kind: global constant
Category: Guides
Access: public

hideGuides(hideOptions)

Manually hide any active Guides. An argument of an Object containing the property stayHidden set to true needs to be provided in order for the guides hidden to stay hidden.

Kind: global function
Category: Guides
Access: public

ParamTypeDescription
hideOptionsObjectOptional JS Object containing property stayHidden {boolean}

Example

pendo.hideGuides({stayHidden: true})

initGuides()

Resets and starts guide loop

Kind: global function
Category: Guides
Access: public
Example

pendo.initGuides()

loadGuides()

Manually load guides for current visitor and URL. This is typically handled automatically by the Agent whenever the host Application changes its URL. In rare circumstances, a host Application may chose to force the load of Guides programmatically. One reason may be in order to get any guides designed for a visitor immediately after using a specific part of the Application that doesn't cause a URL change.

Kind: global function
Category: Guides
Access: public
Example

pendo.loadGuides()

onGuideAdvanced()

Proceeds to the next step in a multi-step guide and sends a guideAdvanced event. Can advanced multiple steps or beyond a specific step by passing optional parameters. Lastly, sends a guideSeen event for the resulting displayed step.

Kind: global function
Category: Guides
Access: public
Example

pendo.onGuideAdvanced()

Example

// optionally advance multiple steps at once
pendo.onGuideAdvanced({ steps: 2 })

onGuideDismissed()

Hides the current guide and invokes the guideDismissed event. Dismissed guides will not be re-displayed by default unless they have a recurrence setting or can be reactivated with an element. They can always be redisplayed via onGuideAdvanced or onGuidePrevious.

Kind: global function
Category: Guides
Access: public
Example

pendo.onGuideDismissed()

Example

// can optionally dismiss guide until next page reload
pendo.onGuideDismissed({ until: 'reload' })

onGuidePrevious()

Proceeds to the previous step in a multi-step guide and sends a guideAdvanced event. Can rewind multiple steps or beyond a specific step by passing optional parameters. Lastly, sends a guideSeen event for the resulting displayed step.

Kind: global function
Category: Guides
Access: public
Example

pendo.onGuidePrevious()

Example

// optionally go back multiple steps at once
pendo.onGuidePrevious({ steps: 2 })

onGuideSnoozed()

Snoozes the current guide. Guide will redisplay after snooze length, or default of one day. If another guide is eligible to be shown, it will show after snooze.

Kind: global function
Category: Guides
Access: public
Example

pendo.onGuideSnoozed()

Example

// optionally advance multiple steps at once
pendo.onGuideSnoozed({ steps: 2 })

showGuideById(id, reason)

Activates the Guide for the given id, if loaded. If it is not in the payload, this function will return false.

Kind: global function
Category: Guides
Access: public

ParamTypeDescription
idstringid of the guide to display
reasonstringoptional reason for the display

Example

pendo.showGuideById('guide_id')

showGuideByName(name, reason)

Activates the Guide for the given name, if loaded. If it is not in the payload, this function will return false.

Kind: global function
Category: Guides
Access: public

ParamTypeDescription
namestringname of the guide to display
reasonstringoptional reason for the display

Example

pendo.showGuideByName('guide_name')

startGuides()

Starts the process that loops over all currently loaded guides and determines what to show. Checks multistep guide continuation, auto-display guides, launcher guides, and badges.

Kind: global function
Category: Guides
Access: public
Example

pendo.startGuides()

stopGuides()

Clear any showing guides and prevent any loaded guides from rendering. Loaded guides remain in memory, so calling startGuides will work just fine after a stopGuides call.

Kind: global function
Category: Guides
Access: public
Example

pendo.stopGuides()