Understanding Tracker Reports

    Overview

    Trackers in Sugar® let administrators and supervisors oversee user productivity and system efficiency. They monitor system performance data, session information, and slow queries as well as the frequency of users’ record-save actions and page views (i.e. which modules and records they have accessed). This article explains how to enable trackers, what they are used for, and defines the different types of tracker reports available within the application. 

    For more information on creating new tracker reports, please refer to the article Reporting on User Activity.

    Prerequisites

    • Trackers must be enabled by an administrator using the steps in shown below. Sugar gathers tracker information only when trackers are enabled. For reports that reflect a particular time period (e.g. last 30 days), tracker reports will only evaluate data back to the date and time that trackers were enabled or up to the number of days the administrator has set to retain tracker data.
    • For a regular user to view and create tracker reports, they must be assigned to the stock Tracker role or a role with the tracker modules enabled, as shown in the following role configuration. For more information about roles, please refer to the Role Management documentation.

    Enabling Trackers

    Before any user can view or create tracker reports, an administrator must enable the feature via Admin > Tracker.

    Note: It is not recommended to enable tracker settings if the resulting data is not being consistently used due to the potential performance impact of using trackers.

    Use the following steps to enable trackers:

    1. Navigate to Admin > Tracker.
    2. Enable any or all of the tracker items by clicking the appropriate checkboxes. Please see the Tracker Reports section of this page for more information about each tracker’s purpose.
    3. Select “Log slow queries” to record queries that take longer than the slow query time threshold. The queries will appear in the Sugar log to help troubleshoot performance issues. For more information about the Sugar Log, refer to the Introduction to Sugar Logging article.
      Enable Trackers Checkboxes
    4. Specify how long Sugar should keep data that is collected by trackers in the “Number of days of Tracker data to store when Scheduler prunes the tables” field. The Prune Tracker Tables scheduler will remove any tracker records older than the specified number of days, which will affect tracker report results.
      Enable Numberofdays
      For more information on the Prune Tracker Tables scheduler, please refer to the Schedulers documentation.
    5. Specify a “Slow query time threshold” in milliseconds (1/1000 of a second). Sugar will record database queries that exceed the threshold when “Log slow queries” is selected. If “Tracker Queries” is selected, database queries will also be logged in the database, making them available for reporting. For more information on how this time threshold works, please refer to the Tracker Queries Module section of this page.
      Enable slowquery

    Tracker Reports

    A stock installation of Sugar comes with fifteen built-in tracker reports. Users can also build their own tracker reports either from scratch or by copying the stock reports and then creating variations of them. Tracker reports provide visibility into user actions and system performance. These types of reports show data such as page views, record views, record save actions, and system performance data. They give supervisors the ability to run reports on the modules that a user has accessed on a particular day, as well as the actions performed in those modules.

    The information available in a tracker report depends on team membership. For example, when viewing a tracker report based on user activity, a supervisor can view their own data as well as data for their subordinates. However, admin-type users can track and view activities for all users.

    After enabling trackers, the enabled tracker modules will be visible for admins and users assigned to the Tracker role when creating a new report. For more information on setting up tracker reports, please refer to the article Reporting on User Activity.

    There are four types of tracker reports in Sugar, each based on a different tracker module:

    • Trackers
    • Tracker Sessions
    • Tracker Performance
    • Tracker Queries

    Each report assists a user in different ways, as explained in the following sections.

    Trackers Module

    The Trackers module counts behavioral events such as save actions and page views, so trackers reports show how users interact with the Sugar application in terms of frequency and module usage.

    When a user visits a record, a tracker record is created in the database similar to the following two:

    Trackers reports can include the following stock fields for use as filter criteria, grouping criteria, or display columns:

    Columns Description
    Action Pages viewed and records saved
    Date of Last Action The date and time when the action was performed
    Item ID The tracker record’s ID
    Item Summary The tracker record’s name or description
    Record Visible Used to manage the “Recently Viewed” records for the user
    Session ID The ID assigned to the user’s session
    Team ID The ID of the user’s private team
    User ID The ID of the user who performed the action

    Stock Trackers Module Reports

    Each time a user accesses a module, Sugar creates a record in the trackers table. The following four stock reports summarize those records and display the data as a chart with a table showing which modules were accessed and how many times. 

    Name Type Description
    Modules Used By My Direct Reports (Last 30 Days) Summation Displays a summary of module usage in the past 30 days for all users who report to the currently logged in user
    My Module Usage (Last 30 Days) Summation Displays a summary of module usage in the last 30 days for the current user
    My Module Usage (Last 7 Days) Summation Displays a summary of module usage in the last 7 days for the current user
    My Module Usage (Today) Summation Displays a summary of module usage so far today for the current user

    This image shows an example of a summary trackers report on module usage:

    The other three stock Trackers module reports all show lists of which records were modified in Sugar, by whom, and within the specified period of time.

    Name Type Description
    My Recently Modified Records (Last 30 Days) Rows and Columns Lists records assigned to the current user that were saved in the last 30 days
    My Records Modified (Last 7 Days) Rows and Columns Lists records assigned to the current user that were saved in the last 7 days
    Records Modified By My Direct Reports (Last 30 Days) Rows and Columns Lists records saved in the last 30 days by users who report to the currently logged in user

    This image shows an example Trackers report on record interactions:

    Tracker Sessions Module

    The Tracker Sessions module records active users’ session data, such as session round trips. A session starts when the user logs in, and the session updates each time the user performs an action in the application. This helps the administrator better understand how much time users are spending in Sugar as well as how many actions are completed.

    A user can have up to two sessions going at once, which allows them to use the web interface at the same time they are logged into a secondary, integrated tool (e.g. Sugar Mobile). A session expires after six hours of inactivity by the user, as monitored by the updateTrackerSessions scheduler.

    For example, when a user starts a new session in Sugar, performs an action, and then logs out, the records similar to the following two are logged in the database:

    Tracker Session reports can include the following stock fields for use as filter criteria, grouping criteria, or display columns:

    Columns Description
    Action Count The number of trackable actions
    Client IP Address The IP address of the user’s computer 
    Date of Last Action The date and time that the last recorded trackable action occurred
    Date Start The date that the first action was tracked in the current session
    ID Related Tracker Performance information
    Seconds Active The total number of seconds between the Date Start and Date of Last Action values
    Session Active If set to true, an action has been tracked for the user within the last 20 minutes
    Session ID The ID assigned to the session; If a user starts another session without logging out of an existing session, a new session ID is assigned to the user, and the new session is marked as active (Session Active = true).
    User ID The ID of the user who performed the action

    Stock Tracker Session Module Reports

    The stock Tracker Session module reports show the general activity of users in terms of logged-in sessions. 

    Name Type Description
    Active User Sessions (Last 7 Days) Rows and Columns Lists the duration of all user sessions over the last 7 days
    User Sessions Summary (Last 7 Days) Summation Summarizes the number of session roundtrips and total active time for each user over the last 7 days

    In the following User Sessions Summary report, notice that the user with ID “1” (Administrator) had the most sessions logged in the last seven days (3), but the other user was much more active in terms of session round trips and time spent in Sugar.

    Tracker Performance Module

    The Tracker Performance module collects server performance information such as database round trips (i.e. requesting and displaying information from Sugar’s database), the number of files accessed, server response times, and memory usage. Because Sugar transactions vary in complexity, these metrics help administrators understand how many steps are being performed, how many items are being touched, and the amount of time these operations take to complete.

    For example, when a user logs into Sugar, performance-related data such as the following is captured in the database:

    Tracker Performance reports can include the following stock fields for use as filter criteria, grouping criteria, or display columns:

    Columns Description
    Database Roundtrips The number of times Sugar requested and displayed information from the database 
    Date of Last Action The date and time that the most recent tracked action occurred
    Files Accessed The number of PHP files that were used to perform the action
    Memory Usage (bytes) The amount of memory used, in bytes, to perform the action
    Server Response Time The length of time, in seconds, that it took for the server to respond to this action 

    Stock Tracker Performance Module Reports

    There are five stock Tracker Performance reports, each displaying data that relates to different time periods and users:

    Name Type Description
    My Usage Metrics (Last 30 Days) Summation Shows the total server response time in seconds, total number of database round trips, and total number of files accessed for the currently logged in user in the last 30 days
    My Usage Metrics (Last 7 Days) Summation Shows the total server response time in seconds, total number of database round trips, and total number of files accessed for the currently logged in user in the last 7 days
    My Usage Metrics (Today) Summation Shows the total server response time in seconds, total number of database round trips, and total number of files accessed for the currently logged in user as of today
    Users Usage Metrics (Last 30 Days) Summation Shows the total server response time in seconds, total number of database round trips, and total number of files accessed for each user in the last 30 days
    Users Usage Metrics (Last 7 Days) Summation Shows the total server response time in seconds, total number of database round trips, and total number of files accessed for each user in the last 7 days

    Note: The My Module Usage (Today) report, although technically a Trackers report, displays data similar to that of a Tracker Performance report.

    Tracker Queries Module

    The Tracker Queries module logs any server request that takes longer than the admin-specified slow query time threshold, storing the query, how many times it has been executed, the last time it was executed, and the average seconds the query took to execute.

    Note: “Log slow queries” must be enabled in Admin > Tracker before any data will be collected for Tracker Queries reports. As an example, if “Slow Query time threshold (msec)” is set to 100, then any query that exceeds 0.1 seconds is logged in the database and included in the Tracker Queries reports. For more information, please refer to the Enabling Trackers section of this page. 

    Tracker Queries reports can include the following stock fields for use as filter criteria, grouping criteria, or display columns:

    Columns Description
    Average Seconds The average time it takes to run the query
    Date Modified The last time this query ran
    ID The ID of the Tracker Query entry
    Query Count Number of times the query executed 
    SQL Statement The text of a particular SQL statement 
    Seconds Total The cumulative amount of time it took for every execution of this query to complete

    Stock Tracker Queries Module Reports

    There is one stock Tracker Queries report in Sugar:

    Name Type Description
    Slow Queries Rows and Columns Lists the details for queries that took longer than the query threshold limit defined in Admin > Trackers

    The following image shows an example of the stock Slow Queries report, which conveniently includes the entire contents of the relevant SQL query: 

    Because this report displays all of the queries that break the slow query time threshold, it is a useful report when troubleshooting unusual behavior with your database server or performance issues with your instance.

    in Reports

    Reach out to us for help