Gainsight PX need "include" or "keep" rules and Or add some function to reset SDK config after aptrinsic.js loaded

Related products: PX Admin & Security

Because of Gainsight PX don't have include rules, only exclude rules, in UI config settings, the common SDK config, also only support the following ways, mask or exclude

filterUrls : ["*app2/*.html*"],
filterType : "mask", // "exclude" OR "mask"

if we want to only keep or show our cloud product url in Gainsight PX data, we have to use https://support.gainsight.com/PX/Security/Enablement/Exclude_and_Mask_Tracked_Data#URL_Masking_Function

If need to control all the URLs which sent to PX, we can supply a Javascript function similar with your Docs mentioned, the function must take one argument and return that argument with any modifications.

It works if load https://web-sdk.aptrinsic.com/api/aptrinsic.js directly, but in our products, we use Segment analytics.js to load aptrinsic.js, no way to reset SDK config, like set the JS modification playload.URL back to function to sdk config before tracking.

Segment add Gainsight as destination, only share identify, group, track functions, auto sent to Gainsight identify or custom events, other HTML Dom tracking still finished by Gainsight PX.

Segment sent me some example codes:

• https://segment.com/docs/connections/destinations/catalog/google-analytics/#multiple-trackers
• https://segment.com/docs/connections/destinations/catalog/google-analytics/#multiple-trackers

like mixpanel can run reset config in the analytics.js ready function

analytics.ready(function() {
window.mixpanel.set_config({ verbose: true });
});

I just want to know if any aptrinsic.js SDK api can do the similar things

var config = {
filterUrls: ["*"],
maskUrlFunction: (urlPayload, mode) =>{
urlPayload.url = urlPayload.url && urlPayload.url.replace("secret", "xxx");
return urlPayload;
}
}
analytics.ready(function () {
window.aptrinsic('config', 'maskUrlFunction', config);
console.info("config maskUrl Function ready");
});

Thanks a lot
Bo

Be the first to reply!