I need to show a list of referrers for all nodes of a single user, and it seems to me that it's not so easy to achieve with the current statistics.module. I guess the "nid" field should be added to the accesslog table, for 2 reasons:

1) the function statistics_node_tracker() selects nodes by path (WHERE a.path LIKE "node/[nodeID]"), and this requires an index on the "path" field; with the "nid" fields it would be WHERE a.nid="[nodeID]";
2) tracking a user's nodes would require a simple join between accesslog and node (WHERE a.nid=n.nid AND n.uid="[userID]").

If this topic is of interest, I can submit a patch for this task.

Comments

pasqualle’s picture

Version: 6.x-dev » 7.x-dev
dave reid’s picture

Status: Active » Closed (won't fix)

You could possibly use views for this, or have referrer information exposed to views. I think this is out of the scope of core.