Skip to main content

Analytics

The options listed below pertain directly to analytics functionality of the Agent like event capturing.

Available Options

OptionDescriptionDefaultType
allowedTextAn array of exact strings that can still be included in event data if text capture is disabled (excludeAllText). This will override any allow list that is stored for your application settings. These are not selectors but are equality checks (the string 'Bug' will allow links that have 'Bug' as the text to be captured but not ones like 'Bug Report')[]string[]
analytics.excludeEventsAn array of specific Pendo events that you do not want the Agent to capture. Available event types include: identify, meta, load, click, focus, submit, change, track.[]string[]
enableDebugEventsIf set to true, the Agent will log out when various events internal to the Agent occur.falseboolean
eventPropertyMatchParentsBy default, a click event property rule can be matched against the element that is clicked on or its parents. If this is set to false, the rule will only be compared to the exact element clicked on. This can be done in cases where performance issues are seen with event properties. Learn more about feature click event properties here.trueboolean
excludeAllTextBy default, the Agent will include text from elements while capturing events. Setting this to true will instead prevent the text from being included unless it matches the allowedText list. If the subscription flag to disable text capture is turned on, this option cannot be used to reenable it.falseboolean
excludeNonGuideAnalyticsWhen true, automatic browser events used for analytics will not be sent to Pendo. Guide events will be collected as usual to track and display guides correctly.falseboolean
interceptPreventDefaultBy default, the agent will attempt to intercept calls to preventDefault on touchend events in order to ensure that Pendo still tracks the click event. There are cases where your application might prevent these original clicks in order to synthesize your own click event, in that case and where you might be seeing duplicate clicks because of it, this functionality can be disabled.trueboolean
interceptStopPropagationBy default, the agent will also attempt to intercept calls to stopPropagation and stopImmediatePropagation for click, focus, submit, and change events in order to ensure that Pendo can still probably recognize these events. In the case of this causing duplicate events or other issues, this functionality can be disabled.trueboolean
syntheticClicks.elementRemovalSometimes an application removes an event that is clicked on between the mousedown and mouseup browser events. In these cases, Pendo will not be able to capture the click event properly for events or guide behavior. Setting this to true will have the Agent intercept these types of element removal to ensure more consistent Pendo behavior (this option has been moved from interceptElementRemoval).falseboolean
syntheticClicks.targetChangedA click is classified by the browser as the same element receiving the mousedown and mouseup events. When true this option will allow Pendo to treat cases where a visitor clicks down the mouse, moves the mouse off the element, and then lifts the mouse button as having been a click on the original down element. For accessibility purposes you might want to set this to false.trueboolean

Example

pendo.initialize({
visitor: {
id: "PUT_VISITOR_ID_HERE",
name: "John Doe",
email: "user@acme.com",
role: "Viewer"
},
account: {
id: "PUT_ACCOUNT_ID_HERE",
name: "Acme Co"
},
allowedText: [],
analytics: {
excludeEvents: []
},
enableDebugEvents: false,
eventPropertyMatchParents: true,
excludeAllText: false,
excludeNonGuideAnalytics: false,
syntheticClicks: {
elementRemoval: false,
targetChanged: true
}
});