Active
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Views Data
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 May 2012 at 17:03 UTC
Updated:
20 May 2013 at 22:53 UTC
Hi, thanks for the modules.
With statistics you can add fields to view how many times a given node was viewed. With access log you can view when a page was viewed.
Im trying to merge the two, so I can see when each node was viewed but this doesnt seem possible. It only seems possible to view how many times a nodes been viewed.
So is it possible to join the access log onto other tables such as node, so I can add the access log fields onto nodes?
Thanks for any help
Comments
Comment #1
gpk commentedIf this is what you are trying to do then I don't fully understand what the problem is since you are saying that you already have a solution?!
Have you found the "track" tab when viewing a node? That lists every time the node has been viewed.
Comment #2
ocamp commentedhi, the access log lets you view pages by url, not nodes by nid. So you dont get the nid arguments or fields.
Yes ve seen the track tab. Thats pretty much what I want but in views so I can add extra fields.
Comment #3
gpk commentedTo merge the data you would normally use a relationship but from what I can see that relationship hasn't (yet) been defined in Views (in 6.x at least). I'm not entirely sure how you want to present the data but you might be able to get somewhere if you only want results for one node at a time, by using arguments and having 2 separate views showing at the same time (the second in a block perhaps). One node view and one access log view.
Comment #4
rooby commentedAs mentioned by ocamp, the accesslog table only stores the path that was viewed, not the node ID or any other entity ID.
So the views relationship would have to be on the path.
You could make a fancy relationship that joins on the path, but it would have to split the nid out of paths that were of the form node/nid and then join that with the node id.
Similar relationships could be done for other pages, like user pages of the form user/uid.
Comment #5
gpk commentedThe node tracker page/tab http://api.drupal.org/api/drupal/modules!statistics!statistics.pages.inc... looks for entries in {accesslog} where path is of the form node/nid or node/nid/xxxx .... i.e. it pulls out more than just node views.