Products » Support Forums 

Support Forums

HomeHomeGeneralGeneralBeginners ForumBeginners ForumNew site log problemNew site log problem
Previous
 
Next
New Post
5/18/2009 5:15 PM
 

 Hello.

i'm trying to create a new site log to display the pages/tabs used by users.

for example, lets say i have 3 differet tabs(pages) in my nuke site, call them page 1,2 and 3.

i also have 3 different users , user A,B and C.

what i'm interested in is a reports that displays the number of times each users has seen a page (pressed on the tab).

example result would be:

user page hits
A 1 34
A 2 76
A 3 12
B 1 43
B 2 17
B 3 23
C 1 65
C 2 12
C 3 45

problem is i have no idea where is that data stored, i've tried to look in the added sql scripts (User Visit Detail etc..), but i can't figure out them to the fullest.

any help would be appreciated.

 
New Post
5/19/2009 1:50 AM
 

Here's the sql you want:

select coalesce(u.Username, 'Anonymous') as UserName
     , TabPath as TabPath
     , count(*) as PageViews
from dnn_SiteLog l
left join dnn_Users u
 on u.UserId = l.UserId
inner join dnn_Tabs t
 on t.TabId = l.TabId
where DateTime between '2008-07-01' and '2008-07-31'
group by u.UserName, t.TabPath
order by 1,2
 

You'll have to replace the dnn_ with either a different object qualifier, or remove it if you don't use an object qualifier on your site.  Ie, dnn_Tabs should be Tabs if you don't have an object qualifier in your web.config.

Change the datetime values to filter between different dates.  If your site is large, I wouldn't recommend running with too large a gap between the date fields, or you'll probably timeout your database.  You can also add other columns to this query from the user, tabs and sitelog tables.  The SiteLog table is where the detail is stored, as long as you have the 'track visits' options switched on in your host settings, and your site settings.

Incidentally, you shouldn't talk about 'hits' when discussing web stats.  A 'hit' is just a record of a resource being pulled from a server.  It is better to talk of 'Page Views' instead.

 
New Post
5/19/2009 5:56 AM
 

 Thank you very much, that did the trick.

also, a super fast response if i have ever seen one 

 
Previous
 
Next
HomeHomeGeneralGeneralBeginners ForumBeginners ForumNew site log problemNew site log problem


Support Guidelines.. Please read before posting

To get support on iFinity products and services, please search the forums for the the answer to the problem you are seeking. If you cannot find a solution, post a question in the relevant forum.   Ensure that you specify the relevant versions of the problem, and the actual error message or a detailed description of the problem.    You will need to register with this site to post on the forum.  If you have a Microsoft Live (Hotmail/Passport) account you can use that.  If you have a Open Id account you can use that.  If you neither of these, you will need to register a user Id and password.