How Count/entries in sp_log works
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2020 12:43 AM
I want to get the number of visits per day to a page item for a specified period (say 5 months). In sp_log table an entry is made for each visit but the count is given as 0. How the count is calculated for a page item?
Related to getting the usage analytics, what are the possible values we can collect other than visit counts?
Thanks in advance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2020 08:32 AM
In sp_log table, entries of Type "Task View" or "Catalog View" or "Catalog Request" (for example) all populate the ID field, which is the "sys_id" you specified.
Within the widgets, this is the line that does the logging:
$sp.logStat('Catalog View', data.sc_cat_item.sys_class_name, data.sys_id, data.sc_cat_item.name);
You can create a report that filters Type="myWidget" and then group by ID.
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2020 09:54 AM
So is the script necessary for portal pages? I have few more doubts regarding the same.
1. What is the purpose of count column? I am seeing the value as 0 for entry related to my filter condition as specified above.
2. Do we have a proper documentation which explains the sp_log table details and uses?
3. Other than counting the visits as mentioned above, what other usage statics we can infer from sp_log table/ through other methods which Service now offers?