- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2022 08:30 AM
Hello,
Does anyone know where to find more information on how to create custom events for User Experience Analytics? For example how many users have accessed Raise and Incident record producer and how many have actually created an Incident?
Thank you!
Solved! Go to Solution.
- Labels:
-
User Experience Analytics

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2022 01:26 PM
Hi,
The relevant developer APIs and docs are available here:
https://developer.servicenow.com/dev.do#!/reference/api/rome/client/SNAnalyticsClientAPI
Please note that the APIs are supported for Quebec as well.
Kind regards,
Zahi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2022 01:26 PM
Hi,
The relevant developer APIs and docs are available here:
https://developer.servicenow.com/dev.do#!/reference/api/rome/client/SNAnalyticsClientAPI
Please note that the APIs are supported for Quebec as well.
Kind regards,
Zahi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2022 02:34 AM
Custom events on user experience analytics
UX analytics for service portal automatically tracks pages and has got few OOB events to track user clicks.
Sometimes these OOB features do not provide the whole picture of user's interaction with the portal.
In this scenario we can make use of SNAnalytics - Client API and add custom events to our widgets.
One of the use cases of adding a custom event would be on Employee Center Portal, all topics are visible on the page emp_taxonomy_topic and it gets tracked under UI Analysis>Pages module on the UX analytics dashboard, in which we cannot determine which topic page was actually opened.
Another use case could be adding trackers to the custom widgets, in which tracking wouldn't be enabled OOB.
CUSTOM EVENT ADDITION
The event can be added to the client controller of the widget. Include snAnalytics to the api.controller definition(line 1)
api.controller = function($rootScope, $timeout, cabrillo , snAnalytics) {
And then add the custom event to the widget
var payload = {};
payload.name = "View Topic";//can change event name
payload.data = {};
payload.data["Record Item"] = c.data.topic.name; // the attribute Record Item can be changed to any value
payload.data["Record ID"] = c.data.topic.id; // the attribute Record Item can be changed to any value
snAnalytics.addEvent(payload);
Result on the UX analytics dashboard