Install Pendo on a login page

Last updated:

This article describes how to add the Pendo install script to your login page so that you can serve guides there.

The install script

Pendo is installed into your application with an install script that must be included on every page of your application. The install script consists of a short JavaScript code block (snippet) that securely and asynchronously loads the Pendo agent, which is a JavaScript file (pendo.js). The install script includes your unique API key and the initialize method needed to activate the Pendo agent. The initialize method also determines what values you pass as Visitor and Account IDs, and the metadata that you provide to Pendo. For more information about the main components of Pendo installation, see the Developer's guide to implementing Pendo using the install script.

To install Pendo on your login page, you must copy the same install script with all the metadata you currently pass on other pages to the login page. The only difference is that you receive anonymous visitor data on the login page due to the lack of metadata being passed to Pendo because your visitors aren't signed in. For more information, see the Anonymous Visitors article. 

Find your install script

Pendo admins can find the install script in Install Settings in Pendo.

  1. Navigate to Settings > Subscription Settings from the bottom of the left-side menu.
  2. Open the Applications tab.
  3. Find and open your application from the Applications list.
  4. Open the Install Settings tab.

Copy the code block so that you can use it to install Pendo on your login page.

Install Pendo on your login page

Paste the install script to the app code for your login page.

Because visitors aren't signed in on this page, ensure that you're capturing anonymous visitor data by following the instructions in the Anonymous Visitors article. For more information, see the Show guides to anonymous visitors section of the Anonymous Visitors article. The Show Anonymous Visitor Data setting isn't needed to show guides to visitors from the login page. This setting is only needed if you want to also see anonymous visitors in your analytics.

No changes are required to your install script. However, you can comment out the metadata fields out to have the same effect.

For more detailed guidance about Pendo installation, see the Developer's guide to implementing Pendo using the install script.

Target guides to your login page

Once Pendo is correctly installed on your login page, tag that page as described in Tagging and viewing Pages in Pendo and target guides to that specific Page.

Was this article helpful?
2 out of 4 found this helpful