3

On a website, we want to be able to produce a list the most popular categories (taxonomy terms). We don't want to rank terms by term page views but rank terms by content page views. When a user views a node page, the score/rank of all terms associated with the node should increase.

I couldn't find any module that provides this feature. As most statistics modules count and aggregate pages views, an acceptable solution would be using a reliable page view counting module that stores its information in the database (or any query-able external datastore). From there, a periodic ranking of the terms' popularity could be computed.

The solution has to work behind a caching reverse-proxy and when Drupal caching is enabled.

Note: we are already using Google Analytics to track traffic.

2

I don't know of a module which does this but you may be able to do it via google analyitics

token array will allow you to put all taxonomy terms into a custom variable

google analytics reports allows drupal to create reports from GA

So in theory you should be able to do this, I'm not sure how GA handles multiple values for the taxonomy

  • It has not been implemented but if nothing else, we will use GA event tracking to track a taxonomy term view event. Then use google_analytics_api_report_data (from the Google Analytics Reports module) to periodically query GA and extract the last X days data for this event and build the charts (and cache it for a day). – Pierre Buyle May 26 '11 at 12:58
  • 1
    We ended implementing this solution. When viewing an entities, terms from the selected vocabularies in any Taxonomy Term reference field are pushed to GA as a taxonomy term view event. Top viewed terms for the last period are retrieved with (and cached by) google_analytics_api_report_data. – Pierre Buyle Dec 2 '11 at 13:48
  • @PierreBuyle : do u have a ref somewhere where we can see implementation steps ? – vishal Aug 25 '14 at 15:39
  • @vishal Sadly nothing public. But if I remember correctly, this was very straightforward once. The documentation Google Analytics Reports documentation provides example. And once you have your query in Google's Data Feed Query Explorer, putting them together was pretty easy. – Pierre Buyle Aug 27 '14 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.