Skip to main content
Gainsight Inc.

Install Gainsight PX on Your Web App

Welcome to Gainsight PX!  

Although the initial installation should be straight-forward, we’ve put together this checklist to make it dead simple.

Note that this Install Checklist is for those who are NOT using any Tag Management platform. If you are, please click on one of the below:

Still here?  Great, once you complete the below steps, your Gainsight PX Installation will be complete so that your events and their associated users/accounts from your product will be flowing into Gainsight PX.

Here's a quick setup video:

STEP 1:  Create your Product Definition and Gainsight PX Tag Code

Navigate to Account Settings -> Products and create your product definition and click Create, for example:

pasted image 0.png

Once created, you’ll see there is a tab for each channel you can Generate Gainsight PX Tag for (i.e. Web App, Website). Let's create the Web App tag for this product by entering in the URL of your Web Application. For Example,

The URL you enter is for informational purposes only and what you enter there does not impact your use of Gainsight PX. Nevertheless, it is good practice to enter in the URL there to keep track of which of your products is assigned to which tags.


Now you have created the tag that will be associated with your product and channel (i.e. Web App or Website).

If you also have a website channel that you want to track leads from, click the Website tab, enter in the URL for your website.


  • You have the ability to create, track and build engagements for more than just one product! Just repeat the process for your additional products.
  • You may also want to define one product for each of your environments that you plan on using with Gainsight PX (that is staging, production).
  • The free version of Gainsight PX allows for one product definition.

STEP 2: Get the Tag Installed on to your Web App and Web Site (Developer Assistance Needed)

Once you have the Gainsight PX Tag generated (STEP 1), click on the Copy button to copy the Gainsight PX Tag code on to your clipboard.


Now you can paste the tag into an email, slack, JIRA ticket, etc. and send it to your developer with instructions to add it to the <head> section of your web application (or website) as close to the opening <head> element as possible and below any dataLayer=[{...}] declarations.

Without installing the tag and identify code, data will not flow into PX. Hence making PX Analytics, Reporting, and Engagements non-functional.

In Identify Code, User id is the bare minimum requirement. The more attributes you send at the User or Account Level, the more you can slice and dice the analytics.

We strongly recommend that you send the actual User sign-up dates for the correct representation of analytics and for triggering on-boarding engagements to 'actual' new users.

Check out the sample verbiage below that you can use for the note to your developer.

Use PX Tag for Website as per the PX Subscription: There is no charge for this functionality. It works as mentioned in the following:

  • Add the Website tracking code (the “-1” key) which tracks the anonymous usage and that usage will be stored/maintained in PX database.
  • That anonymous user/data won’t be exposed to PX UI anywhere until that user fills out a form on the website in which case a lead will be created on PX and exposed on PX UI with all of the previous usage data.

STEP 3: Code the Identify Call In Your Application (Developer Assistance Needed)

The identify() call is javascript code that your developer will also need to add to your product. This call should be made from your application from where the user authenticates so that your web application can provide user and account information of the user that is generating and sending events to Gainsight PX.

Here's the coding instructions you should share with your developers




Hi Dev Team,

We've signed up to use a vendor called Gainsight PX that will allow us to build in-application experiences (i.e. tooltips, sliders, and guides) to help us with product adoption and user retention. As part of their installation, we need to perform both of the below tasks:

Task 1 

Add the Gainsight PX tag to our code to push our web app's events to the Gainsight PX platform.

Install the Gainsight PX Tag to the section of our web application, as close to the opening element as possible and below any dataLayer=[{...}] declarations.

Here is the tag to add to our production web application


Task 2

In our production web application, we'll need to also push the correct user/account over to Gainsight PX so that we can associate the events that are tracked (i.e. clicks, page views, etc.) with the correct user/account.  

Please add the below javascript to the location of where the authentication code takes place in our web app.

If you can be sure to include all of the known user and account attributes that we have for that user and account by referencing their API name, here is the full list of out of the box attributes and their API names.

If there are other attributes we should send to Gainsight PX, just let me know and I can set them up in Gainsight PX as custom attributes (here).

//passing user and account objects: 
//User Fields
 "id": "unique-user-id", // Required for logged in app users 
"email": "", 
"firstName": "John", 
"lastName": "Smith", 
"signUpDate": 1522697426479,

//unix time in ms
"plan" : "gold",

//Custom attributes - please create those custom attributes in aptrinsic via Account Settings to be tracked.
"price" : 95.5,
"userHash": "" // optional transient for HMAC identification },
//Account Fields
"id":"IBM", //Required
"name":"International Business Machine",
"Program": "Platinum"
// flat custom attributes





STEP 4: Verify Your Setup

Make sure you see users in Audience Explorer and you can see accounts in Account Explorer

Audience Explorer


Account Explorer



I am unable to view users

Check that the identify call is fired from your application, you can use a simple chrome browser console and fire an identify call manually.


Use this test code:


I am unable to view accounts

Check that the account object has valid id, you can use a simple chrome browser console and fire an identify call manually.

aptrinsic('identify',{"id","email":"","firstName":"John","lastName":"Smith"},{"id":"account","name":"account test"});

If you cannot execute the code and get an exception it means the tag is not installed

For further troubleshooting click here.

To learn about all frequently asked questions, refer PX Tag and Identify Code Installation FAQs article.

I am unable to view Identify and Click Data for users

To view the Identify call data and clicked events for a user, perform the following tasks.

  1. Click Audience explorer.
  2. Select the required user.
  3. Click >>.
  4. Click Full Profile.
  5. Click the Recent Activity menu icon and select the Identify and Clicked checkboxes. 
  6. Click Apply.



  • Was this article helpful?