--- title: "Use Config API" slug: "use-config-api" updated: 2026-11-23T12:30:19Z published: 2026-11-23T12:30:19Z canonical: "support.gainsight.com/use-config-api" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.gainsight.com/llms.txt > Use this file to discover all available pages before exploring further. # 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. ### Syntax The syntax of the API is: ```plaintext window.aptrinsic('config','tagKey',productKey); ``` 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. ### Syntax ```plaintext aptrinsic('config', 'enableTag', false) ```