2

Is there any way I can count unique visits to my Drupal Site. I have a customized reporting module for the Drupal within which I want to put the unique visits to the site based on date.

I am using this query:-

SELECT
  n.title, n.nid, a.timestamp AS visited,
  COUNT(*) AS times
FROM
  {node_view_count} a, {node} n where a.nid = n.nid AND a.uid = :uid AND n.nid <> 2120 
GROUP BY
  n.title
ORDER BY
  times desc,
array(':uid'=>$_GET['uid'])) -> fetchAll();

Do you think there is any way?

Thanks.

1 Answer 1

1

Try the Visitors module to either use it or help you with your code. It provides many features concerning visitors info and among them is the "unique visitor" feature you are interested in. A similar approach would be also the Counter module.

1
  • Thank you. If it could allow it, then that would be awesome But it only show it in block, Is there a way I can access the Query which Shows Unique Visitors based on their IP?
    – Steve
    Jun 20, 2013 at 20:04

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.