Self-hosting the Pendo Web SDK

Last updated:

The Pendo Web SDK is the JavaScript that runs in your web application, collects raw event data, and displays guides. A standard Pendo installation loads pendo.js securely and asynchronously from a CDN. We highly recommend loading the Pendo Web SDK from our CDN to ensure that you're using the most current version. However, you can self-host the Pendo Web SDK if security restrictions require you to do so.

For more information on Pendo installation and configuration, see:

Disadvantages of self-hosting

Pendo continuously releases updates to the Pendo Web SDK, typically weekly. Many of these updates include feature enhancements that require the updated Pendo Web SDK to be present in your application for the feature enhancement to work properly. Self-hosting the Pendo Web SDK stops you from receiving the current version of the web SDK when the application loads, which may block access to those updates. More importantly, self-hosting the Pendo Web SDK prevents you from automatically receiving critical security updates. Self-hosting also requires additional developer time to install and manage the web SDK.

The web SDK reflects the current Pendo settings. If any changes are made, you must update the web SDK for those changes to take effect. This means that changes to your settings in Pendo don't occur until the updated web SDK is downloaded and hosted with a locally hosted web SDK.

Adding or removing staging environments in Pendo requires an updated version of the web SDK to recognize those changes. Staging environments are used to deploy and test guides outside of your production environment. The staging version of the Pendo Web SDK always comes from the Pendo CDN and any modification of the install script to change this isn't supported.

Download the web SDK

Download the Pendo Web SDK from Web SDK Settings, which is an application-level setting.

  1. Go to Settings > Subscription settings.
  2. Open the Applications tab.
  3. Find and open the relevant application from your Applications list.
  4. Open the Web SDK Settings tab.
  5. Select Manage Production Settings.
  6. Select the Download link to download pendo.js.

DownloadLink.png

Host the Pendo Web SDK

After downloading pendo.js, host the file somewhere your application can access. For example, you could host the web SDK at https://myapp.com/assets/pendo.js.

Update your install script

After you've uploaded pendo.js to your directory, update the install script to load pendo.js from your location. You need to update src='https://cdn.pendo.io/agent/static/'+apiKey+'/pendo.js' in the install script with the location of your locally hosted web SDK. You must make this change everywhere Pendo is installed in your application. This could be on a single page or on multiple pages of your application, depending on the details of your specific installation.

If you need to update the web SDK, you only need to replace pendo.js in your directory unless you also change the location or filename.

Was this article helpful?
3 out of 3 found this helpful