Advanced Instrumentation

Updated 5 days ago by Michael Alon

Use Custom CSS Selector

Specifying a customized selector can be done by checking the custom option when creating a feature event rule and setting the selector manually.

You can also use a Custom Selector for sibling selector:


#dashboard__kpis--new-accounts + .kpi

DOM Element with sibling

<div class="kpi" id="dashboard__kpis--new-accounts" />
<div class="kpi" id=""/>

Use Additional Page Elements for Instrumentation

In case your app uses customized HTML attributes you'd like Gainsight PX to track and associate with features, all you need to do is specify these elements in the SDK settings page under account settings:

Specify Elements (Wildcards can be Used as well):

For example - using viewname which is a custom element that can be tracked:

<div class="viewWrapper" viewname="P287" data-example-555="P287">

1. You'll need to add the exact element name or use wildcard in case there is a pattern:

2. Choose the attribute in the selector which will be populated automatically

Use Custom Events For Instrumentation

In case there are pre-existing custom events (see here) instrumented via code you can leverage the custom event mapping to associate these events with features.

1. Create a feature or add a custom event rule to an existing feature by selecting the relevant location on the tree and using right click:

2. Add a custom event rule by right clicking on a feature:

3. Setting the rule values can be done by selecting the custom event name. You can also use it's properties as part of the rule

If you do not see the custom event in the list, it means the code that fires these events does not exist or is failing

How did we do?