I have a site where we want to send out information to "owners" of certain pages to tell the users how many page views the page got in the last month.

I think this could done 2 ways:

  1. A module that keeps the a monthly count of page views. I have looked at Statistics Counter module but it seems to simple. It resets as soon as the new month starts. So if I wanted to send information for the last month it would lost as soons as the next month started. Any other modules that keep this information for past months? Or maybe I should just write a very simple module that would write the old month count to a history table before it gets reset.
  2. Let Google analytics handle this. Either through custom code or a module query Google analytics with path, and date range. Is there module does this already?

Other ideas on how to do this?

Thanks for any help on this

3 Answers 3


I haven't tried this yet, but https://drupal.org/project/google_analytics_sync might get you part of the way there.


Try this module https://drupal.org/project/nodeviewcount, it allows to count node views for each user and you can get statistics for different periods


I had to do something similar, but I just wrote a little code to talk to the Google Analytics API via the nice PHP wrapper provided by Google.

Then in a module, I made a little JSON callback that talked to the API, pulled the GA data for the page, and then massaged it a little so it would produce pretty charts on the front-end for the user.

Here's some sample code to get you started: https://gist.github.com/jmk1ng/9442895

Honestly, you're better off just writing something simple like this yourself. Whatever module you find to accomplish this is just going to either bloat your database with view tracking.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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