Hi,

I'd like to provide every writer on my site an individual stats report for nodes they authored.The reports would use Views and would be displayed on their personal dashboard.

My assumption is that it would just need to add a filter (contextual filter and or/relationship) in Views. But this type of filter is not available when creating access log reports.

Currently, in a content View, it's possible to add node count, but it is not about unique visitors. Besides, Top referrers, and top Keyphrases/keywords is not available as well.

Also, there's apparently no way to add granularity over time periods (e.g. exposed filters to view stats per day, week, month, etc, or time range between to dates input). Some modules somehow do that, but again, no uniques stats.

Would anyone be interested in this kind of feature ? Or may be is it already doable in a way I didn't think of ? Is there a module already available elsewhere ?

What would it take to implement this feature ?

I'm sorry for all these questions… I'm not a programmer. But, I would be really interested in your thoughts.

Thanks

Comments

iamEAP’s picture

This is definitely something I'd love to support in this module, but I think providing that functionality is going to take a decent amount of work. You should use the -dev version of this module as a starting point since Views support is already merged in. Views should make the basis of all reports going forward.

That being said, I think you'd need to do something like the following:

  • All data beyond node hit statistics is being stored in some way in the accesslog table; there's currently no way in Views to create a relationship between accesslog and node (and thus, node and user). One of several things needs to happen to change that:
    • We add a new column to accesslog that's just "nid" that we can use to create a relationship between nodes and accesslog entries, it maybe better to do an entity_id column and and entity_type column instead (to be as generic as possible),
    • It may be possible to skip that new column (because it slightly duplicates the existing "path" column) and write a Views plugin that is able to generate a pseudo-nid column with which we can build the same relationship
  • Regarding date granularity... I can't remember of the top of my head what an exposed filter for a core date (as opposed to Date module) exposed filter looks like. It may do what you want, but the UX may not be fantastic.
JRZ-2’s picture

Thanks for your reply!

I'd love to see this in stats too! Anyway, I fixed a temporary solution using Better Statistics and
statistics filter module. But still trying to figure out how to include more flexibility in all of this.

There is also a statistics advanced module that exists for Drupal 6 (partially ported to D7), I don't know if this module could be useful.