Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

Statistics: View and Download Count
Last Post 04/01/2010 4:38 PM by Peter Donker. 4 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
jsumant
New Member
New Member
Posts:20


--
03/30/2010 4:18 PM

Hi,

Is there any way to get the usage count for individual documents like View Count and Download Count for individual document uploaded in DMX module?

Thanks,

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
03/31/2010 4:40 PM
Hi Sumant,

Views are not recorded but could theoretically be retrieved from an IIS log. Downloads are logged in the DMX_Log table. So it should not be hard to get at that information.

Peter
jsumant
New Member
New Member
Posts:20


--
04/01/2010 11:56 AM

 Hi Peter,

I am aware about the fact that Downloads are logged in the DMX_Log table. With reference to the same, Can I have entry in the DMX_Log table for Action "View".

Currently, I am having Document Details page as a separate tab in DNN. Suppose on the page load if I add entry to DMX_Log for Action "View" and access those records from the database for passed EntryId, it should work. 

Appreciate your response for this solution.

jsumant
New Member
New Member
Posts:20


--
04/01/2010 2:14 PM

Hi Peter,

For retrieving "Download Count", I am using following Code

Dim arrLogs As ArrayList = LogsController.GetLogsByEntry(Me.EntryId, -1)

This call populates ArrayList object with the objects of type LogInfo class. But it is not including Log Entries from DMX_Log table for passed EntryId where UserId = -1.

In our module configuration, we are allowing download functionality to anonymous users. For every anonymous download, application makes one entry to DMX_Log table with UserId as -1.

Appreciate if you can suggest any other way to retrieve Download Count.

Thanks

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
04/01/2010 4:38 PM
Hi Sumant,

For a view counter you'll need to partial src so you can inject the log event on page views.

For download count, I'd write my own logic and use my own database calls. It is far easier and quicker. You'd make a function along the lines of GetEventCount(EventName as string, EntryId as Integer) As Integer and then handle the correct counting in SQL.

Peter
You are not authorized to post a reply.