Skip to main content
Gainsight Inc.

Use Config API

This article explains how to configure API for Switching Products in a Single Page Application(SPA).

Switch Products in a Single Page Application(SPA)

Gainsight PX provides the feature JS SDK tagKey Method to have the PX tag loaded in a multi-product environment under the same wrapping iframe/shell. In such an environment, PX requires the ability to switch product keys since users are switching between applications without a full page reload (relevant to Single Page Application). The tagKey method provides a function in the SDK that allows you to restart the SDK and pass in the relevant product key.


The syntax of the API is:


In the above syntax, tagKey refers to the  Gainsight PX tag that you obtain from Administration > Products page.

Opt-Out User Tracking

Use Config API to opt-out from tracking the current user. This API allows the admin to easily make the call for any users for whom they do not want cookies stored or network calls made back to PX, essentially never hitting the PX Server. The selected users will not view any active engagements or Knowledge Center Bot.


aptrinsic('config', 'enableTag', false)
  • Was this article helpful?