How to Track User Queries and Selections
What is Tracking Behavior?
Tracking Behavior is comprised of the queries users perform and the selections they make when querying in SmartHub.
This information can be analyzed in order to better meet user needs, improve the quality of your search, and anticipate future search demands.
How is Tracking Behavior Set?
Tracking behavior can be set by Admins or Users in different locations:
Administrator Set Behavior
- Administratorscan specify tracking behavior using the
SH.Analytics
settings in the modules/SmartHubResourceLoader/DefaultModuleSettings.jsfile. - Copy the settings described below into your custom settings file, such as CustomResultsSettings.js for your custom Results.html page.
- Modify the settings as you see it. DO NOT modify the DefaultModuleSettings.js file. It is overwritten at upgrade time.
-
- If administrators choose not to show the tracking behavior control on SmartHubpages, the value of the
defaultTrackingBehavior
setting will be used as the tracking behavior for all users.By default, defaultTrackingBehavior is set to "0" in the DefaultModuleSettings.jsfile:
0 - Track activity
(default)
: All queries and selections are tracked and associated with the name of the user.1- Do not track
: No information is recorded.2- Track but hide identity
: All actions are monitored, but no personal data is associated with the tracking. SeeUser Profile mappings.After you change the "
showTrackingBehaviorControl
" to "false," wait 10 minutes (let the sync to run two times) and then delete and recreate the paxindex. This way you ensure that you don't have old records in your reporting site.
- If administrators choose to show the tracking behavior control on SmartHubpages, the tracking behavoir will be the one specified by the user in the UI.
- If administrators choose not to show the tracking behavior control on SmartHubpages, the value of the
User Set Behavior
Userscanchange their own tracking level by clickingAnalytics from theUser Preferencesmenu:
In neither case does the tracking option affect the pages that a user can access.
How to Determine which SmartHub Modules Return Tracking Results
Use the following list to understand which SmartHub Analytics modules use tracking behavior.
By default, these modules are invoked in the <SmartHub_install_dir>/modules/SmartHubResourceLoader/DefaultModuleSettings.js file:
- LoadPage: Triggered on any page refresh and records information about the page and the user.
- Query: Triggered when a query is performed and results are returned. Records information about the query, user, and the returned result set.
- OpenResultItem: Triggered when a user clicks the link to a document. Will record information about the document, the entered query, and the user.
- ApplyRefiner: Triggered when a refiner is applied. Records information about the query, the refiner, and the user.
- This is an enrichment module.
- It adds information about the current user when an event is performed.
- Information is retrieved from the SharePoint User Profile service.
- Enriches information from ApplyRefiner with Visual Refiners special features such as:
- Show More
- Keep Filter
- SearchWithin
PreviewDocument: Triggered when a user previews a document using Smart Previews.
Records information about:
- Previewed document
- Interactions performed
- Query
- Users
- Provides details about user interactions with the Chatbot.
- Provides document ratings related to:
- Content source
- Document quality
Custom Modules That Can Use Tracking Behavior
You can develop 2 types of custom modules:
- Capture module: This module captures events such as tracking mouse movements in order to learn about user search operations.
- Enrichment module: This module enriches the captured data.
For more information, contact BA Insight Support.
User Profile Settings
In order to use the tracking option, you must configure your user profile settings.
These settings determine which users have their actions tracked.
SmartHub Analytics calls the User Profile Service to obtain the profile details. Some of these properties (details) are saved in the index.
The information that is stored in the index appears as User Analytics reports.
View Hidden Identity Values for Tracked User Operations with Hidden Identities
See the User Profile mappings from the DefaultModuleSettings.js file below.
- The file format is set as:
"User Profile Property Name": "Analytics internal mapping name" - The property name from the User Profile appears on the left side of the colon ':' on each line.
- The Analytics internal mapping name appears on the right side, after the colon ':' on each line.
Hidden User Identities
For each User Profile property (such as Department
, Job
, or Location)
: if a user chooses to track operations, but to hide their identity, a unique value appears, such as Anonymous
asda43dsad5
.
See the properties in the Reporting site, shown here:
How to Track Queries "case sensitive"
By default all the queries are recorded and shown "lower case".
This causes the queries "test" and "Test" to be grouped and reported as "test".
If you need to enable case sensitivity for queries, copy the parameter enableCaseSensitivity (from DefaultModuleSettings.js) into your pages's custom setting file and set it to true.