Skip to main content
Gainsight Inc.

Hosting SDK

This article explains the steps to host the SDK.


Gainsight PX is SOC-2 Type-II compliant and takes security measures to protect access to the code or data. If hosting the SDK is still a security requirement for your organization, this document will walk you through the process.

For more information on how to proxy the traffic with your own CNAME, which is not required for hosting, read the Enable PX Tracking with Proxy Server article from the Additional Resources section.

Steps to Host the SDK

  1. Hosting the JS files and CSS
  2. Override the SDK path in the tag and override the content endpoint setting

Hosting the JS Files and CSS

File US Path EU Path  Description Variables

You require the Product KEY if you need to fetch content from Gainsight PX before hosting. URL (For more information, refer to the screenshot below this table)

You require the Product KEY if you need to fetch content from Gainsight PX before hosting.


(Refer to the Tag Snippet Example)

Widget Key is not required widgetFileEndpoint 

(Refer to the Tag Snippet Example)
Badge icons

The following   file paths are branched off the root





















Override the SDK Path in the Tag and Override the Content Endpoint Setting

Gainsight PX SDK will try to fetch relevant assets such as JS/CSS unless you override the cssFileEndpoint and widgetFileEndpoint properties. 

  • Update the domain with the new host
  • Pass the setting to the SDK via cssFileEndpoint and widgetFileEndpoint 
  • Update the product KEY

Tag Snippet Example 

<script type="text/javascript">
  (function(n,t,a,e,co){var i="aptrinsic";n[i]=n[i]||function() {
    var r=t.createElement("script");r.async=!0,r.src=a+"?a="+e;
    var c=t.getElementsByTagName("script")[0];c.parentNode.insertBefore(r,c)
      "cssFileEndpoint":"" ,   


Gainsight PX Guide Editor 

These are the files used by the in-app Editor for Gainsight PX admin. These files are not required for runtime tracking or engagement, and therefore not required for hosting.


Additional Resources

Enable PX Tracking with Proxy Server


  • Was this article helpful?