Agent API
The Agent API allows developers to interact with the Pendo Agent that collects user interaction and displays in-app messaging in your app. The default installation provides everything needed to effectively capture auto events and deliver guides to your end-users.
Installation
To make use of the Agent API, Pendo must be correctly installed and initialized in your application. The install script or "snippet" fetches the JavaScript agent, and the initalize method must follow to start Pendo on a page. Both must complete to fully install Pendo. See a more in-depth guide to installation in the Pendo Help Center.
Agent Functionality
Additional functions allow you to control the agent and the data collected by the agent. The agent can exclude text collection, programmatically change page URLs captured in events, delay guide loading, and more to customize your installation.
Advanced functionality, like sending track events, debugging, and programmatically activating guides requires interaction with the Agent API inside your application JavaScript.
Any undocumented functionality you encounter while inspecting the pendo
namespace should be considered either internal or experimental and is subject to change. Don't rely on undocumented functionality.
Agent Build Differences
We offer three builds of the agent to support various browser environments. New installations will use the Standards
version by default with modern browser APIs to improve security and performance. This is the recommended version, but XHR
and JSONP
builds are also available to support legacy browsers and guides. The major differences between the builds are listed below.
Standards | XHR | JSONP | |
---|---|---|---|
Best for | Environments using modern browsers | Environments that need to support some legacy browsers | Environments that primarily use legacy browsers |
Security compliance | Most secure request format and unlikely to be flagged by security scanning tools | Most secure request format though polyfills may raise false negatives in security scanning tools | Potentially vulnerable from script element request and polyfills may raise false negatives in security scanning tools |
Guide load method | JSON data via XHR request | JSON data via XHR request | JSONP request to evaluate javascript |
CSP permissions | connect-src | connect-src | script-src |
IE support | None | IE 9 and up | All IE versions |
P1 guide support | Limited support | Full support | Full support |
Guides codeblocks | Only code blocks without templates | All code blocks | All code blocks |
Agent Updates
The Agent typically releases a new version each week. Releases will first reach the Beta release track and then after a few days will be moved to the Stable track. The notes for each release can be found here.
Debugging
For additional troubleshooting, you can use our debugging tool by running pendo.enableDebugging()
in the console. A full guide on the what you can do with the debugger can be found here.