Base Script
This script loads at the base of the Vida single page app (SPA). ReplaceYOUR_PENDO_KEY
with your unique Pendo key.
Pendo Example
User Identification Script
This script runs when the user and account are loaded. It includes thetraits
argument, which provides data about the user and the account. Use traits.user.externalUserId
and traits.account.externalAccountId
to match the user and account to your internal analytics. Before the user can be identified, you must first call pendo.initialize()
with the argument visitor.id
set to traits.user.externalAccountIdd
. See below for an example.
Arguments
traits
- object of attributes for the user and the account
Example
Page View Tracking Script
Tag a page load. It is best to usewindow.location.href
to pass which page is loaded.
Event View Tracking Script
Tag predefined tracking events such as clicks, modal views, or form submissions in Vida. We recommend prepending the event withVida
so you can more easily document which events are coming from the Vida iframe.
Arguments
event
- string representing the name of the eventprops
- object of attributes unique to this event