This seems strange, but i cant find any module that counts visitors per day. The data is already there, in the statistics module/watchdog. But there is no SQL:"COUNT(*)" made. I can list top visitors, but i can´t count them.

On a production site you dont whant to know with IP that visited - you whant to know how many that visited today compered to yesterday.

I tried "Visitors" module - but that only counts a sum. You can use pen and paper and read the counter once a day - but thats not the way it should bee. You can get the numer of users on every Monday for example - but the main question - how many visitors where there yesterday is not answered.

This is such a basic feature so it ought to exist, this should be quite easy to write module (using the statistic module data) so I just wonder if someone already wrote it before I write it myself.

Comments

iamacyborg’s picture

You can always use Google Analytics for that, there's a handy GA module available.

laghalt’s picture

If you dont have an answer - shut up.

chrispeat’s picture

Wow, I think that is a really rude response to someone trying to help you. In nearly all instances Google Analytics would provide far more enterprise features for tracking visitor information than a simple Drupal module would. I am sure that there are reasons for you wanting to do this but from reading your post the last persons post doesn’t seem to justify your response, but perhaps I'm too polite for forums...

What are you trying to do that Google analytics wouldn't achieve?

laghalt’s picture

If you post a OFF TOPIC respons to a post - that makes people avoiding the first subject.

If I whantet a third party system intergration I would have written so. I you cant read "statistics module" you should try elementary school.

I´ll be nice to you and give you a OT advice:
YOU DONT WHANT A THIRD PARTY LIKE GOOGLE ACCESING YOUR VISITORS LOGS.

iamacyborg’s picture

You might want to remove your tin foil hat and rethink your position.

chrispeat’s picture

I dont wish to get into any sort of forum argument and accept your off topic comments. In many ways Google analytics, AWStats etc do all provide the solution that you are looking for so it is not fully off topic, it just doesnt suit your wants/needs. If it is the sharing of private data then a more traditional log analytics tool like AWstats would still fit your needs, although there would probably be better solutions but I'm sure you get my point.

There are other modules such as http://drupal.org/project/counter which may help, or between the two you may be able to customise one into a new solution or create a new module as you suggested earlier.

I am afraid that past that I am unable to offer any more help, but hopefully someone else will and at least through these posts are able to see exactly what you are looking for.

Hopefully in some way that helps and you do not feel the need to insult me further.

Thank you,

Chris

chrispeat’s picture

And just to help a little futher, here is a list of web stat modules for Drupal which should in some way help you.

http://drupalmodules.com/category/Statistics

laghalt’s picture

If you read the original post (witch I anyway removed) - I have already looked trough those.
Counter is a counter - nothing more.

As for the OT.

The main problems with forums is that people answers without reading the question.

If we all stop accepting that forums like start to work.

Being rude is a pedagogic way to make people read.

Your postings is not of topic - but as I wrote - I have already looked throug those. If I write I cant find this function and I get the anwers "Search" - that is not helpful. The reason you write in a forum is that you dont get anything browsing through the modules.

sagar ramgade’s picture

Hi,

Try this : http://drupal.org/project/visitors

Hope this helps and changes your attitude.

Acquia certified Developer, Back end and Front specialist
Need help? Please use my contact form

laghalt’s picture

Read original

I tried "Visitors" module

It just confirms my point.

vm’s picture

Being rude is a pedagogic way to make people read.

It's also a great way to get your posts ignored by others who can answer your questions now and at a later date. ; )

laghalt’s picture

They wouldnt find my post under layers of OT likes counters and third party intergration of statistic services anyway.

As any serious topic starts to turn out like a copy of the beginners guide, regardles of the original subject - soon nobody will bother reading the treads and answer.

If I dont whant to reinvent the wheel - perhaps help in a project instead. But I dont mind - I can write this module. But if any serious debate turn to "I whant to write - I need confirmation" you don´t realy consider putting out a new module on drupal.org.

This will hurt the opensource attitude.

vm’s picture

You're assertions are totally off base and viewed through a very narrow perception.

The fact that other users tried to help is far more a benefit to the community than your responses to them. Being blantanly rude to those who are trying to help, regardless of the level of help they provide, is of zero benefit to any community. You're attitude toward those who offer help or suggestions (even if they've made a mistake in their suggestion or haven't throughly read your question) is what hurts open source and communities in general (both online and offline) by pushing away those who want to aid others and subsequently put forth an effort to try.

What you've neglected to realize is that your own actions toward those users provides an unfriendly atmosphere. Essentially your responses to those trying to aid are a cancer that eats away at a helpful community atmosphere. This in and of itself says far more about your character than those who are trying to provide a helping hand through suggestions (whether those suggestions are right or wrong).

If you don't like the way users on drupal.org offer help or suggestions don't ask your questions on drupal.org. Set up your own support forums, disallow any users but yourself (and those who've the same philosophy as you), then feel free to answer your own questions. This will ensure that your totalitarian dictatorship will be followed and will ensure that you and users like you don't bump heads with those of us who believe in the meritocracy that is drupal.org.

To those who tried to aid, I applaud your efforts. Regardless of how this specific user feels, those of us who support the forums by way of answering questions on a regular basis appreciate the effort you put forth to help others. It is, despite what this user thinks, the spirit of community and open source. Please do not let this users reaction toward that help become a reason not to continue to offer help to others.

WorldFallz’s picture

1) Please don't post duplicate threads.

2) Being rude is never ok on drupal.org-- regardless of your intentions. It's not going to work anyway.

3) Please don't remove content or blank out posts, I've reverted the original topic so the context is back.

Finally, as regards to your question, google analytics or other analytics modules (there are several) are the preferred way to view this info. Another option might be the http://drupal.org/project/counter module.

laghalt’s picture

I know - but the fact that treads change topics is a problem, I still interested if there is a count by day module. The readers of the thread will not understand the qeustion when evrybody talk of somthing else.

People that dont read the post (or understands it) but just feel the erge to answer somthing completely different does ("trying to help") is contraproductive.

And no - the counter module is not a day by day statistic - its a counter of the total visits.

WorldFallz’s picture

If someone volunteered to give you $20 when you needed $1000 would you yell at them for being "counterproductive"? Being rude to people volunteering their time trying to assist and telling them to go away says way more about you then it does them. How many people have YOU tried to help in your 3+ years as a registered user on drupal.org? Oh wait, as usual with people who complain about the type and quality of help on drupal.org-- not many, if any. Makes your attitude seem that much more egregious.

No worries though-- if you're that particular about the type of free help you get I'm sure no help at all will come as a welcome relief.

And before you complain about what others do for free, consider pitching in yourself first.

laghalt’s picture

Sure, we cant count points. I think I done somethings for the comunity - perhaps I could have done more.

My point was a point of order of debate - but that is realy OT. I have some ideas that you read the posting before you answer and that you dont make a new subject if it already exists and so on. But there might be others that has a different perspective. I can accept if this forum has a different policy - thoug I might disagrea.

And as you might notised - I didn´t ask for somthing for free - I was offering. The new module is almost done by the way.

WorldFallz’s picture

It's not a matter of points-- no one is keeping track. Until you criticize others that is. Then your criticism will most certainly be judged relative to your contributions. You posted here, berating volunteers, with an attitude you're simply not entitled to, period. It doesn't matter what your point is, if you try to make it by insulting and being rude to others. Contribute, don't contribute. But disparaging behavior toward others, whatever the reason, will not be indulged here.

Saeh’s picture

ive found that the problem with forums is that people have to filter, through spam of the same posts over again like your double postings to get a response, and then instead of being presented with a solution im looking through more posts of your arrogant responses to suggestions.

Saeh’s picture

he posted the same answer to both of your cough *same posts!

if hes spamming then your spamming.

except hes trying to help - your not - you shut up!!

laghalt’s picture

I think we can sum it up - the answer is no.

Writing that module.

rinno.casca’s picture

Dear laghalt,

I am in need of this module to count per day. I've read your posts, wasted a few mins, looked at your profile, it seems that you didn't write a module to solve this problem as you stated. Have you done anything to solve this problem?
I am digging up this thread after a year and half because I am having a few issues with google analytics. If you have found a solution, please be kind enough to post it here without barking as I wouldn't want to bother another moderator for noise control.

Sincerely,
Thanks.

EPO’s picture

I had the same problem and some similar. First I shout "Hurray" when I discovered the Visitors module and then I began to curse about its limitations. (Well, I had also this Google Analytics friends, which I kicked in the ass). I end up copying the whole module in the subdirectory "mymodules", renaming it to "visitors_extra" and writing my own filters which I linked in an extended menu. My code now looks as followed (only the relevant snippets):

....
 $items['visitors/monthly_history_extra'] = array(
    'title' => 'Monthly history extra',
    'description' => 'View pages count per month.',
    'page callback' => 'visitors_monthly_history_extra',
    'access arguments' => array('access visitors'),
    'file' => 'visitors_extra.admin.inc',
    'type' => MENU_NORMAL_ITEM,
  );

  $items['visitors/monthly_history/graph_extra'] = array(
    'title' => 'Monthly history extra',
    'description' => 'View pages count per month.',
    'page callback' => 'graph_visitors_monthly_history_extra',
    'access arguments' => array('access visitors'),
    'file' => 'visitors_extra.admin.inc',
    'type' => MENU_CALLBACK,
  );
...
function visitors_monthly_history_extra() {
  $items_per_page = variable_get('visitors_lines_per_page', 10);

  $header = array(
    array('data' => t('#')),
    array('data' => t('Month'), 'field' => 'm', 'sort' => 'asc'),
    array('data' => t('Pages'), 'field' => 'count'),
  );

  $sql = sprintf('select count(*) as count,
                  %s as m,
                  %s as s
                  from {visitors}
                  where %s %s %s
                  group by m %s',
                  visitors_date_format_sql('visitors_date_time', '%Y%m'),
                  visitors_date_format_sql('MIN(visitors_date_time)', '%Y %M'),
                  visitors_date_filter_sql_condition(),
                  visitors_bot_filter(),
                  visitors_ref_filter(),
                  tablesort_sql($header)
                );
...
function visitors_bot_filter($text = 'visitors_user_agent'){
    $bots = array( '"bot"',
                   '"crawl"',
                   '"slurp"',
                   '"spider"',
                   '"wiki"',
                   '"curl"',
                   '"search"',
                   '"sexy"'
             );
    $lastbot = array_pop($bots);
    $botfilter = ' AND NOT (';
    if (!empty($bots)){
        foreach ($bots as $value){
            $botfilter .= ' LOCATE(' . $value . ', ' . $text .  ') > 0 OR';
        }
    }    
    $botfilter .= ' LOCATE(' . $lastbot . ', ' . $text .  ') > 0)';
    return ($botfilter);
}

function visitors_ref_filter($text = 'visitors_referer'){
    $refs = array( '"niki-boden"',
             );
    $lastref = array_pop($refs);
    $reffilter = ' AND NOT (';
    if (!empty($refs)){
        foreach ($refs as $value){
            $reffilter .= ' LOCATE(' . $value . ', ' . $text .  ') > 0 OR';
        }
    }    
    $reffilter .= ' LOCATE(' . $lastref . ', ' . $text .  ') > 0)';
    return ($reffilter);
}

You see, what I basically have done is the inclusion of the some filters. So it isn't necessary to hack the whole module. In your case I'd consider to extend the SQL or add a new statement with a GROUP clause and COUNT(*). The shortcoming of the Visitors module isn't the missing functionality, it is the lack of the programmers to implement the Drupal hook system (hook_db_rewrite_sql() ) properly.

peterx’s picture

I have a module, http://drupal.org/sandbox/peter/1479432, to summarise the Visitors data by day. It makes reporting by day quicker than reading the original table plus the original table can be reduced to a few days. If there is sufficient interest, I will promote the module to a project.