how can i see how much times a KB article is been viewed with in a particular period of time ?

sunthosh
Tera Contributor

I see that ; it is been accessed 3 times.

find_real_file.png

How can i find at what period these were viewed. (EX: To check how much times a KB is accessed in the past 3 days)

1 ACCEPTED SOLUTION

Dave Smith1
ServiceNow Employee
ServiceNow Employee

If you have rights, simply type "kb_use.list" in the navigator filter.   Mine looks like:


kb_use.png



Hope that helps!


View solution in original post

20 REPLIES 20

If we write a code for calculating the views manually; is it possible


Yes, it is possible. You can create a new table and an onload script to capture view count for each day per KB Article and have a schedule job to delete the entries after x no. of days if required.


great; by creating the code can i get the views calculated within certain period of time, as i asked prior


Yes, you can as long as you have the view count captured for each day for each knowledge article.


Step 1: Create a new table 'u_kb_count_per_day'


Step 2: Create 2 columns 'Article No.' & 'View Count'.


Step 3: Create a client callable script include which takes Article No.as a parameter.


                      In the script include query table "u_kb_count_per_day" and check if entry for today, for the passed article no. exists.


                      if yes, then add 1 to the view count and update the record.


                      if the entry doesn't exist, then create a new entry and set the view count as 1


Step 4: Create an onload script on kb_knowledge and make an asynchronous ajax call to the above script include and pass the knowledge article no.



Step 5: You can use the data from table 'u_kb_count_per_day' then to get views over a certain period of time. Keep in mind this will work only for new views .



Step 6(Optional): You can write a scheduled job which deletes the old entries from table 'u_kb_count_per_day' after x no. of days.



Hope this helps.