Skip to main content

Events

Members

doNotProcess : string

If a visitor has been marked as "Do Not Process" then this value will be set to true.

Functions

attachEvent(element, evt, fn, useCapture)

Pendo agent’s version of attaching event listeners.

detachEvent(element, evt, fn, useCapture)

Pendo agent’s version of detaching event listeners. Callback must be a named function, cannot remove anonymous functions.

flushNow(force)ayepromise.Promise

This will force a flush of cached event objects.

isSendingEvents()Boolean

Returns true if event collection is currently enabled.

startSendingEvents()

Starts event collection and transmission.

stopSendingEvents()

Stops event collection and transmission.

track(name, [props])

Method to manually track events. Requires a non-empty name string to collect event.

attachEvent(element, evt, fn, useCapture)

Pendo agent’s version of attaching event listeners.

Kind: global function
Category: Events
Access: public

ParamTypeDescription
elementHTMLElementDOM element to attach listener
evtstringtype of DOM event
fnfunctioncallback function
useCaptureBooleanuse capture phase instead of bubble

Example

pendo.attachEvent(pendo.dom("h1")[0], 'click', helloWorld = () => { console.log(Hello World") });"

detachEvent(element, evt, fn, useCapture)

Pendo agent’s version of detaching event listeners. Callback must be a named function, cannot remove anonymous functions.

Kind: global function
Category: Events
Access: public

ParamTypeDescription
elementHTMLElementDOM element to attach listener
evtstringtype of DOM event
fnfunctioncallback function
useCaptureBooleanuse capture phase instead of bubble

Example

pendo.detachEvent(pendo.dom("h1")[0], 'click', helloWorld);

doNotProcess : string

If a visitor has been marked as "Do Not Process" then this value will be set to true.

Kind: global variable
Category: Events
Access: public
Example

pendo.doNotProcess => true

flushNow(force) ⇒ ayepromise.Promise

This will force a flush of cached event objects.

Kind: global function
Returns: ayepromise.Promise - from {flushBeacons}
Category: Events
Access: public

ParamTypeDescription
forcebooleana "full" flush, i.e. ALL {pendo.buffers.silos}

Example

pendo.flushNow()

isSendingEvents() ⇒ Boolean

Returns true if event collection is currently enabled.

Kind: global function
Category: Events
Access: public
Example

pendo.stopSendingEvents()
pendo.isSendingEvents() => false
pendo.startSendingEvents()
pendo.isSendingEvents() => true

startSendingEvents()

Starts event collection and transmission.

Kind: global function
Category: Events
Access: public
Example

$ pendo.startSendingEvents()
> Pendo Agent unlocked. Events will be written.

stopSendingEvents()

Stops event collection and transmission.

Kind: global function
Category: Events
Access: public
Example

$ pendo.stopSendingEvents()
> Pendo Agent locked. No more events will be written.

track(name, [props])

Method to manually track events. Requires a non-empty name string to collect event.

Kind: global function
Category: Events
Access: public

ParamTypeDescription
namestringname of the collected event
[props]Objectoptional properties object to collect with to the event

Example

pendo.track('scroll')