Filter Analytics Data for Custom Metrics with Track User Attribute
The Track User Attribute setting in Search Clients > Edit > Analytics Settings > Analytics Properties allows you to add and track custom user attributes in search sessions, alongside standard events like clicks, searches, and page views.
Use Case
Each organization has its own list of metrics for tracking. For example, a company may want to track how frequently the documents for product X are accessed. Alternatively, another company may want to track a widget W is used. Such custom metrics, which can be security groups, products, teams, or other attributes, can be defined and tracked using Track User Attribute.
Enable Track User Attribute
-
Navigate to Search Clients > Edit > Analytics Settings > Analytics Properties.
-
Toggle Track User Attribute to the right.
Note: Track User Attribute works only for logged-in users.
Fig. A snapshot of the Track User Attribute toggle in Analytics Properties.
-
After enabling Track User Attribute, a dialog box appears with two fields:
Label. The category name that appears in Search Analytics reports.
-
Labels categorize data for easier filtering.
-
You can activate, deactivate, or edit labels anytime, with changes reflected immediately in reports.
-
If a label has more than five values, a search box appears in reports for easier filtering.
-
Last Selection allows you to apply previously selected values to a report.
Variable. The JavaScript function that captures values for the Label.
-
A JavaScript developer can use window.object to store user attribute values.
-
The Variable fetches these values and associates them with the Label.
Example: If window.product captures product usage data, it can be linked to the Product label.
Fig. A snapshot of the Track User Attribute configuration dialog.
-
-
Enter values for the Label and Variable, then click Continue.