Now that #165380: Make usage statistics visible landed and http://drupal.org/project/usage is live, we need to figure out how to link to these pages from project nodes, and perhaps release nodes.

Comments

webchick’s picture

My thoughts:

A project node like http://drupal.org/project/drupal needs a link to "View project statistics" somewhere, probably under "Resources" with the other links that are related to finding out more about the module.

A project statistics page like http://drupal.org/project/usage/3060 should have a link at the top that says "View all project usage statistics" or similar. Likewise, a release-specific page like http://drupal.org/project/usage/156281 should additionally have one that says "View all Drupal project usage statistics." I picture these as bulleted lists like on the project node. I realize the breadcrumb is there but it is not at all obvious that "Usage" is going to take me to a big crazy table with all usage stats across all projects. The link would make it more obvious.

Not sure about a project release node. Maybe. It would only add clutter to the releases table (and generally speaking the newest versions of things are not what people are using so it's probably a negative thing to add -- for example, 0 people are using Drupal 6.6 right now according to the stats), so definitely don't put it there. It seems like it could be moderately useful on the "View all releases" tab like at http://drupal.org/node/3060/release. But honestly, I'd say don't bother with this. If they're at the project node level, all they really need to know is "The copy of this module you want is version X.X;" how many people are using each release is really only relevant information if you're looking at the aggregate project stats imo.

markus_petrux’s picture

First, something that I wanted to tell since yesterday when I saw "fixed" / "Deployed on d.o". Thank you so much to everyone involved! It's so useful to see if someone else is using what you've decided to share. :)

Now, I would suggest something simple, a section in the project page itself with a little table for usage statistics, maybe just under the releases table. If there were usage stats per release, then that would fit to the releases table itself.

And a qestion: Is there more data that can be shown? For instance, number of downloads per release, etc. Knowning that would make it easy to think about where to integrate this thing with project stuff, maybe.

aclight’s picture

re. Is there still more data that can be shown? As far as I know, no. At least not that project/project_usage collects. Amazon has been working with someone to parse the awstats logs from the web servers for downloads, but that's a completely separate project that we have nothing to do with. Eventually it's possible that somehow that data might be integrated with the project_usage module, and displayed together, but I don't see that happening terribly soon.

I'm a big -1 to adding any usage data into the release table itself. I think it's bordering on cluttered right now, and any additional data like this will take us past the tipping point.

dww’s picture

Assigned: Unassigned » dww
Status: Active » Needs review
StatusFileSize
new3.83 KB

http://project.drupal.org/project/drupal
http://project.drupal.org/project/usage/drupal
http://project.drupal.org/project/usage/184395
http://project.drupal.org/node/184395

Agreed that usage stats in the release download table would suck. That's not at all what I had in mind. All I was thinking of was a link on the release nodes (last link above). It was trivial, so I added it.

Re: other stats, no, not yet. There's work-in-progress on download stats over at #324675: Contrib Module Downloads: Awstats Reporting but it's not ready at this point.

sun’s picture

StatusFileSize
new7.08 KB

I gave this a shot.

I agree with webchick that the breadcrumbs are a) easily overlooked, and b) point to unexpected places - for instance, on http://project.drupal.org/project/usage/drupal the last breadcrumb link points to project/usage, but a user may have come from the project page or even a release node.

So, this patch

  • Changes page titles to "Usage statistics for %project", resp. "Usage statistics for %release".
  • Unifies the header links on project usage pages to always contain (in this order):

    - View all %project_name usage statistics
    - View usage statistics for all projects
    - View %project_name project page

  • Merges theme_project_usage_project_page_no_releases() into theme_project_usage_project_page().
  • Adds a user_access check for the "View usage statistics" link on the project page.
  • Adds the same user_access check for the "View usage statistics for this release" link on the project release page.
sun’s picture

StatusFileSize
new7.11 KB

Meh. Missed to set proper arguments for l().

Also changed the order of header links on project/release usage pages to:

- View all %project_name usage statistics
- View %project_name project page
- View usage statistics for all projects

dww’s picture

StatusFileSize
new7.11 KB

Those are good changes, thanks. The only thing I didn't like was the order of the links on the two pages. I changed it to be:

- View %project_name project page
- View all %project_name usage statistics (optional, only appears on project/usage/[release-nid])
- View usage statistics for all projects

Re-deployed on p.d.o and cleared the cache (try the links from comment #4).

Pretty sure this is RTBC, but I'll try to catch webchick in IRC for a final thumbs up. ;)

sun’s picture

StatusFileSize
new8.09 KB

Albeit you didn't want me to, here's an updated patch that fixes project usage links on the overview page to use project names instead of node ids.

sun’s picture

Status: Needs review » Reviewed & tested by the community

Scratch #8, separate issue.

webchick’s picture

Can this be tossed on p.d.o for a quick perusal? :)

aclight’s picture

@webchick: it is already. See links in comment #4.

dww’s picture

#8 is wrong -- the 'uri' field is from {project_projects}, not {node}. See #326031: Change links in project/usage table to point to project/usage/[uri], not project/usage/[nid] for the right patch for this feature (which belongs in a new issue, anyway -- that doesn't have anything to do with making these stats more visible). ;)

aclight’s picture

I looked at the patch in #7 and the code looks good, though I haven't tested locally. My only comment would be that theme_project_usage_project_page() and theme_project_usage_release_page() don't have @return and a description of the returned value in the phpdoc, but that's pretty minor and I think it's pretty obvious what they are returning anyway.

hunmonk’s picture

code looks good. all links on p.d.o seem to work perfectly.

dww’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD and DRUPAL-5 and deployed on d.o.

dries’s picture

What would be really useful would be to get some sort of rank. Something like "This project is ranked 124th from 2500 projects".

On the overview page, it would be great to show the rank too as well as an up or down arrow to indicate its trend. It is really hard to see trends right now.

Shai’s picture

This is awesome!

How about a link on http://drupal.org/project/Modules

Shai

markus_petrux’s picture

Would it be possible to add stats to "My projects" page? Maybe just for the current week? Maybe removing the link to create issues to make a little room?

aclight’s picture

to all: please create new issues for your feature requests, etc. instead of just tacking them onto this issue, which is marked fixed.

thanks

dww’s picture

Status: Fixed » Active

Right: separate features go in separate issues. Thanks.

However... ;)

The code I committed from #7 is a little careless, and adds a "View usage statistics" link to projects that have no releases. See http://drupal.org/project/drupalorg for example. It just takes you to a page that says "There are no releases for this project." so it's not the end of the world, but it'd be better to just not add that link on projects without releases in the first place. Should be an easy patch, stay tuned.

dww’s picture

Status: Active » Needs review
StatusFileSize
new794 bytes
hunmonk’s picture

Status: Needs review » Reviewed & tested by the community

trivial fix. code looks good.

dww’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD, DRUPAL-5, and deployed on d.o.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.