Node statistics for busy sites with Facebook Shares

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
mshmsh5000's picture

In September 2010 we had a helpful discussion around ways for high-traffic sites, especially sites with external cache layers like Varnish or a CDN, to get usable node access statistics.

That discussion began with Pixel Ping and a Drupal integration module. I've put together the basics of another module now, one that allows you to sort by Facebook shares.

Sandbox: http://drupal.org/sandbox/mshmsh5000/1270176

Features:

  • Queries the Social Graph only on node view, so that unviewed nodes don't add to the Social Graph activity. (And if they're not viewed, they're probably not being shared on Facebook.)
  • Views integration: can sort any node View by "number of Facebook shares".
  • Control frequency of queries via a TTL so that, for instance, Drupal will query the Social Graph a maximum of once every four hours.
  • Override the base URL that Drupal uses to query the Social Graph, so that you can test on a staging server (where you have no Facebook Shares) using production URLs (where you do).
  • Disable Social Graph queries without disabling the module, so that you can stop queries and still retain current data.

It's meant to be simple and lightweight. There's a D6 version only now, because this is getting tested and deployed on Pressflow 6 sites for the foreseeable future.

Thoughts/suggestions welcome!

Comments

sounds good, but sounds a lot

Canadaka's picture

sounds good, but sounds a lot like http://drupal.org/project/views_fb_like which can gather, shares, likes & comments.

would be nice if either were ported to D7.