Skip to main content
Gainsight Inc.

Security Tracking Filters

This article explains how Gainsight PX is set to exclude or mask tracked data.

Overview

Gainsight PX supports custom tracking filters to allow you to exclude or mask some of the tracked data on specific urls, url patterns and query parameters (this applied also to Form Submitted data and referral tracking)

Exclude URLs

To exclude urls and prevent these urls to be tracked:

  • Set the relevant urls with/out wildcards 
  • set filter type to 'exclude'
var config = {    

// url filters example    
filterUrls : ["*app2/index1.html*", "*app2/buttons.html*"], 

// list of URLs to filter or exclude    
filterType : "exclude"};

Mask URLs

To mask urls - set the filter type to 'mask' - it will override the tracked url to apt-maksed-url 

  • Set the relevant urls with/out wildcards 
  • set filter type to 'mask'
var config = {    

// url filters example    
filterUrls : ["*app2/index1.html*", "*app2/buttons.html*"], 

// list of URLs to filter or exclude 
filterType : "mask"};

Exclude or Mask Query Parameters

If you'd like to benefit for more advanced tracking but without exposing sensitive parameters - use the named parameter filter. This filter will apply to ALL urls

  • Set the relevant param names
  • set filter type to 'mask'/'exclude'
var config = {    
// query parameter filters example    
namedParamFilter : ["internalID"],    
nameParamFilterType : "exclude" // "exclude" OR "mask"};

Configure the tag with Security Filters Example

// ---- create the relevant config: ---- 
//var 
config = {  
 
// url filters example 
filterUrls : ["*app2/index1.html*", "*app2/buttons.html*"], 

// list of URLs to filter or exclude 
filterType : "mask", // "exclude" OR "mask"   

// query parameter filters example 
namedParamFilter : ["internalID"], nameParamFilterType : "exclude" // "exclude" OR "mask"};

// ---- pass the config to the tag: ---- //
(function(n,t,a,e,x)
{var i="aptrinsic";n[i]=n[i]||function()

{    
(n[i].q=n[i].q||[]).push(arguments)},n[i].p=e;n[i].c=x;    
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://web-sdk.aptrinsic.com/api/aptrinsic.js",
"AP-USE-YOU-REAL-TAG-PLEASE-DO-NOT-COPY-PASTE-2", config);
}