Skip to main content
To set up Pendo tracking inside the Vida iframe, you need to add telemetry scripts. The scripts you define will automatically be injected into the app once they are set up. We strongly recommend implementing on staging first, then copying to the production version of your reseller account.

Base Script

This script loads at the base of the Vida single page app (SPA). Replace YOUR_PENDO_KEY with your unique Pendo key.

Pendo Example


User Identification Script

This script runs when the user and account are loaded. It includes the traits 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 use window.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 with Vida so you can more easily document which events are coming from the Vida iframe. Arguments
  • event - string representing the name of the event
  • props - object of attributes unique to this event

Example