Reports API Events
click:user
Fires when the user clicks on the "User" field in the supported reports.
You would want to be notified about this event firing to take some action when the user clicks on the "User" field or retrieve the associated information such as the user ID, Activity ID, and session ID, for example.
The following reports are supported:
- progress-by-tag-by-user
- event-progress-by-tag-by-user
- last-score-by-activity-by-user
- last-score-by-item-by-user
- last-score-by-tag-by-user
- sessions-list-by-item (see important note below)
Important When using the session list by item report, the callback will receive three arguments instead of one: userID
, activityID
, and sessionID
.
Examples
reportsApp.getReport('my-report-id').on('click:user', function (userID, activityID, sessionID) {
console.log('This code executes when the user clicks on the "Tag" field.');
console.log(userID, activityID, sessionID);
});
Callback arguments
-
userID string
The user ID associated with the clicked user.
-
activityID string
The Activity ID associated with the clicked user.
-
sessionID string
The session ID associated with the clicked user.