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

gpk’s picture

With access log you can view when a page was viewed.

If 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.

ocamp’s picture

hi, 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.

gpk’s picture

To 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.

rooby’s picture

Title: access log relationship? » Relationship from access log to nodes based on path
Category: support » feature

As 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.

gpk’s picture

The 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.