Skip to main content
Gainsight Inc.

Hosting SDK

This article explains the steps to host the SDK.

Overview

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

IMPORTANT: If your organization uses SDK versioning, use https://cdnjs-web-sdk.aptrinsic.com/web-sdk/<APP-VERSION>/api/aptrinsic.js  instead of the URLS below.  Replace <APP-VERSION> with the applicable SDK version. Click here to learn more about the version number.

 

File US Path EU Path  Description Variables
SDK

https://web-sdk.aptrinsic.com/api/aptrinsic.js


https://web-sdk.aptrinsic.com/api/aptrinsic.js?a=AP-UPDATE_KEY-2

https://web-sdk-eu.aptrinsic.com/api/aptrinsic.js

https://web-sdk-eu.aptrinsic.com/api/aptrinsic.js?a=AP-UPDATE_KEY-2

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)
CSS

https://web-sdk.aptrinsic.com/style.css

https://web-sdk.aptrinsic.com/style.css?a=AP-UPDATE_KEY-2

https://web-sdk-eu.aptrinsic.com/style.css

https://web-sdk-eu.aptrinsic.com/style.css?a=AP-UPDATE_KEY-2

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

cssFileEndpoint

(Refer to the Tag Snippet Example)

Widget https://web-sdk.aptrinsic.com/widget/aptrinsic-widget.js  https://web-sdk-eu.aptrinsic.com/widget/aptrinsic-widget.js Key is not required widgetFileEndpoint 

(Refer to the Tag Snippet Example)
Badge icons

The following   file paths are branched off the root https://web-sdk.aptrinsic.com

/images/badge/types/announce.svg

/images/badge/types/bulb.svg

/images/badge/types/cap.svg

/images/badge/types/exclam.svg

/images/badge/types/question.svg

/images/badge/types/flag.svg

/images/badge/types/guide.svg

/images/badge/types/arrow.svg

/images/badge/types/badge.svg

/images/badge/types/check.svg

/images/badge/types/cross.svg

/images/badge/types/dash.svg

/images/badge/types/feedback.svg

/images/badge/types/info.svg

/images/badge/types/nps.svg

/images/badge/types/star.svg

/images/badge/types/tooltip.svg

   

 

Security_WebDomain_HostingSDK.png

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() {
    (n[i].q=n[i].q||[]).push(arguments)},n[i].p=e;n[i].c=co;
    var r=t.createElement("script");r.async=!0,r.src=a+"?a="+e;
    var c=t.getElementsByTagName("script")[0];c.parentNode.insertBefore(r,c)
  })
  (window,document,"https://px-sdk.yourdomain.com/aptrinsic.js","AP-ZZZZZZZZ-2",
    {
      "cssFileEndpoint":"https://px-sdk.yourdomain.com/style.css" ,   
      "widgetFileEndpoint":"https://px-sdk.yourdomain.com/widget/aptrinsic-widget.js"
    }
  );
</script>

 

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.

/api/editor.js
/api/guide-editor.min.js
/editor.css
/images/preview-green.svg
/images/reoder-1.svg
/font/font-awesome/4.4.0/font-awesome.css
/froala/css/2.5.1/froala_editor.pkgd.min.css
/froala/css/2.5.1/colors.min.css
/froala/css/2.5.1/froala_style.min.css
/froala/css/2.5.1/plugins/emoticons.min.css
/froala/css/2.5.1/plugins/video.min.css
/froala/css/2.5.1/plugins/table.min.css
/froala/css/2.5.1/plugins/image.min.css
/froala/css/2.5.1/plugins/file.min.css
/color-picker/color-picker.min.css
/color-picker/color-picker.min.js
/opentip-native.min.js
/opentip.css

Additional Resources

Enable PX Tracking with Proxy Server

 

  • Was this article helpful?