Exclude and Mask Tracked Data
This article explains how Gainsight PX can be set to exclude and mask tracked data.
Overview
Gainsight PX tracks button clicks, link clicks, and page-views automatically. If your app is using GET calls and passes tokens as part of the URL, Gainsight PX can be set to exclude or mask the parameters without losing those events.
Use the advanced SDK settings to select any level of excluding or masking options. You can exclude an entire url or specific parameters by entering the values into the exclude/mask urls and parameters section.
You can also hard code the configuration on the javascript snippet if you do not wish to rely on server-side settings that are propagated to the client.
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);