Skip to main content

Agent

Members

additionalApiKeys : Array.<string>

Array of additional API keys that are set in the config. If no primary API key is set, the first in this array will be assigned to pendo.apiKey.

apiKey : string

API key that is associated with the current Pendo installation as a string.

Functions

getVersion()string

Returns current version of the Agent as a string. Also directly accessible at pendo.VERSION.

initialize(options)

Initializes the Pendo Agent in a browser window.

isReady()boolean

Returns boolean representing whether the Agent is fully loaded and has an API key.

additionalApiKeys : Array.<string>

Array of additional API keys that are set in the config. If no primary API key is set, the first in this array will be assigned to pendo.apiKey.

Kind: global variable
Category: Agent
Access: public
Example

pendo.additionalApiKeys => ['FIRST_API_KEY', 'SECOND_API_KEY']

apiKey : string

API key that is associated with the current Pendo installation as a string.

Kind: global variable
Category: Agent
Access: public
Example

pendo.apiKey => 'API_KEY'

getVersion() ⇒ string

Returns current version of the Agent as a string. Also directly accessible at pendo.VERSION.

Kind: global function
Returns: string - agent version
Category: Agent
Access: public
Example

pendo.getVersion() => '2.150.0'

initialize(options)

Initializes the Pendo Agent in a browser window.

Kind: global function
Category: Agent
Access: public
See: Pendo Installation

ParamTypeDescription
optionsobjectidentity metadata and configuration to initialize agent

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"
},
apiKey: 'PUT_API_KEY_HERE'
});

isReady() ⇒ boolean

Returns boolean representing whether the Agent is fully loaded and has an API key.

Kind: global function
Category: Agent
Access: public
Example

if (pendo.isReady()) {
// runs if agent has fully loaded
}