Is there a way to only count the unique views in the core node counter stats?

I was using the Statistics Advanced module for Drupal 6 but there is no Drupal 7 solution. The quote below is from the Statistics Advanced module and what I want exactly is that.

Only track 'unique' views of content: If you keep viewing a node over and over again, the "x reads" counter won't increase each time. This is applied on a per-user basis as well as a per session id for anonymous users.

The Node View Count module doesn't effect the core statistics, it creates a new table for itself. So this is not an option for me.

What I'm looking for is a solution that effects the CORE statistics, nothing else.

  • Are you sure the other module does what you want? It says: "Unlike statistics module, this module records each view of node with user uid and timestamp. So now you can know how many times a user viewed node by day, week, month and etc." I take it counts every visit of the same user for the same node, not that it counts a single visit per day.
    – apaderno
    Commented Jul 30, 2015 at 8:09
  • Anyway, the Node View Count project page states, for 7.x-2.x: "Also now we count node views for anonymous users."
    – apaderno
    Commented Jul 30, 2015 at 8:21
  • @kiamlaluno, the other module (Node View Count) doesn't do what I want as I said. But I missed that you wrote on your 2nd comment and I will check it. Thanks.
    – herci
    Commented Jul 30, 2015 at 9:30
  • Node View Count should do the trick, however if you are going to use this to list popular articles, keep in mind if you do it with views default query is very inefficient and can slow down your site as it executes too oftern, better off writting own custom module to do sorting.
    – pgrujic
    Commented Jul 30, 2015 at 13:58
  • @pgrujic, is there any comparison or known performance report for the Node View Count that show it's inefficient to use. Thanks.
    – herci
    Commented Jul 31, 2015 at 13:04

2 Answers 2


Node view count

You may want to use the Node view count module for this. Here is a quote about it (from its project page, bold markup added here):

... allows to count node views. Unlike statistics module, this module records each view of node with user uid and timestamp. So now you can know how many times a user viewed node by day, week, month and etc.

This module is integrated with Views module. You can use it to create different statistics pages, output new not viewed nodes for user and many more.

Specific to the D7 version of it, this is what is included also on the project page:

Also now we count node views for anonymous users.

Statistics Advanced

Be aware of the Statistics Advanced (*) issue "Port Statistics Advanced Settings to D7", with current status = needs review.

My "recommendation" for anybody looking for a D7 version of it, is to review what is attached to Comment # 55 in that issue. And report any potential deficiencies in that same issue (confirmations that it works fine would be appreciated too, also via that same issue).

Other modules to consider

If the Node view count and/or Statistics Advanced (*) module doesn't fit your needs, then you may want to consider reviewing this shortlist of possible alternatives (quotes are from their project pages).

  • Visitors (*):

    Displays information about visitors, and integrates with the WhoIs Lookup module

  • Better Statistics:

    introduces a Statistics API, which allows for a way to collect, limit, and route custom access statistics and data.

  • Piwik Web Analytics:

    Adds the Piwik web statistics tracking system (free open source) to your website.

    Related module: Piwik Reports, which provides graphical reporting of your site's tracking data inside Drupal.

  • Chartbeat:

    ... to provide third party integration with Chartbeat, for real-time site monitoring statistics.

  • Stat Counter:

    ... provides an integration between Drupal and StatCounter web statistics.

Enough options to "explore"?

Disclosure: I'm the maintainer of the modules marked with (*).

  • Thanks for your answer. I will use the Node view count, Better statistics and Visitors module and share the results. Statistics Advanced module is only for Drupal 6, unfortunately (as I said I was using it before). And the other modules are 3rd party integration modules and actually I don't want to use these kind of modules. Thanks again.
    – herci
    Commented Aug 6, 2015 at 18:08
  • "Merci" to "Herci"! And note the extra addition to my answer I just did for the Statistics Advanced module. Are you interested in helping with the "review" of that "issue with comment nr 55" I suggested? Commented Aug 6, 2015 at 19:02
  • OK, after a long time I tried all these modules... but unfortunately none of them does what I really want. What I need is a simple solution that effects the core statistics (module) and tracks only unique hits (based on uid, IP address or session).
    – herci
    Commented Oct 1, 2015 at 13:05

You can try the Better Statistics module.

On the module page it says:

This module introduces a Statistics API, allowing developers and contributed modules a way to collect, limit, and route custom access statistics and data.

For Administrators and Site Builders

  • Customize what data is collected on each page visit
  • Limit where and for whom data is collected
  • Use Views (of type "access log") to generate custom reports using your custom data
  • Download modules that add and extend the above functionality

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.