Jump to content


GetStats


  • Please log in to reply
33 replies to this topic

#1 Guest_Alex_*

Guest_Alex_*
  • Guests

Posted 12 September 2004 - 12:31 PM

I have added a new snippet to the Snippet Library!

Snippet name: GetStats
Author: Alex
Version: 1.0 (Final)
More info: View this snippet
Description:
This snippet collects and displays a lot of visitor information about your site.

Please feel free to comment on this snippet, suggest improvements, or simply praise my work! ;)

[This is an automatically created message]

#2 Guest_rthrash_*

Guest_rthrash_*
  • Guests

Posted 07 October 2004 - 09:07 AM

Is there a way to make a stats page only show up in the admin, without being published to the world in general?

#3 jaredc

jaredc

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,193 posts

Posted 07 October 2004 - 12:01 PM

Is there a way to make a stats page only show up in the admin, without being published to the world in general?

Since the stats on the "Site Statistics" page are pretty light duty anyway, you might consider not having that page at all and rely more fully on the statistics in the :eto: Etomite Manager under Site > Visitor Stats. This is only available to the admin, and is far more robust.

#4 Guest_rthrash_*

Guest_rthrash_*
  • Guests

Posted 07 October 2004 - 12:25 PM

Thanks. That's a great solution for this. For any other page types, I'll have to implement one of the login snippets.

#5 espersen

espersen

    Etomite Forum Fan

  • Member
  • Pip
  • 144 posts

Posted 14 October 2004 - 01:29 PM

Is it possibly to display a part off the admins stats on a page on its own ; visible for all.

I'm interested in the "Top 10 documents" - it could be really nice way to show visitors what pages or products is most popular....

#6 daset

daset

    Etomite Forum Newbie

  • Member
  • 1 posts

Posted 24 February 2005 - 12:12 PM

How can I display "Top 10" to the visitors?

#7 mikef

mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 13 September 2005 - 01:58 PM

Is the $etomite->getSiteStats() call documented anywhere, please?

#8 jaredc

jaredc

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,193 posts

Posted 13 September 2005 - 03:29 PM

array $etomite->getSiteStats()

Returns an array of statistic information from the prefixlog_totals table, which are:
  • today
  • month
  • piDay
  • piMonth
  • piAll
  • viDay
  • viMonth
  • viAll
  • visDay
  • visMonth
  • visAll
The "pi" items are Page Impressions.
The "vi" items are Visits.
The "vis" items are Visitors.

#9 mikef

mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 13 September 2005 - 04:30 PM

Thanks, I'd wondered if it returned any of the other stats in the database as well.

#10 hcenter

hcenter

    Etomite Forum Newbie

  • Member
  • 29 posts

Posted 14 September 2005 - 08:08 AM

So I guess the GetStats is not useable for logging the IP etc. from the last 10 visitors ????

Is there another way to do so?

#11 0zz

0zz

    Etomite Forum Fan

  • Member
  • Pip
  • 86 posts

Posted 16 May 2006 - 07:10 AM

In my case the snippet counts Visits ten times more and Guests (Visitors) i don't know how many, but A LOT! ;)
here you can test: http://www.kr.uz/index.php
the code I use slightly modified for Russian version..
here it is:
$tmpArray = $etomite->getSiteStats();

$output = "
<table cellspacing='0' align='center' class='small'>
<tr><td width='20%'>&nbsp;</td><td width='40%' align='center'><b>Visits</b></td>
<td width='40%' align='center'><b>Visitors</b></td></tr>
<tr><td><b>Today</b></td><td align='center'>".number_format($tmpArray['viDay'])."</td>
<td align='center'>".number_format($tmpArray['visDay'])."</td>
</tr>
<tr><td><b><nobr>This month</nobr></b></td>
<td align='center'>".number_format($tmpArray['viMonth'])."</td>
<td align='center'>".number_format($tmpArray['visMonth'])."</td>
</tr>
<tr><td><b>Total</b></td>
<td align='center'>".number_format($tmpArray['viAll'])."</td>
<td align='center'>".number_format($tmpArray['visAll'])."</td></tr>
</table>
";

return $output;

Please, what should I fix to make it count properly?

#12 0zz

0zz

    Etomite Forum Fan

  • Member
  • Pip
  • 86 posts

Posted 17 May 2006 - 05:01 AM

Please! Any ideas?..

#13 Jelmer

Jelmer

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,173 posts

Posted 17 May 2006 - 05:28 AM

Please don't bump topics. If there's someone with the answer to your question, he/she will answer.

#14 Ralph

Ralph

    Loves Etomite Forums!

  • Admin
  • 6,539 posts

Posted 17 May 2006 - 01:59 PM

This may or may not have an impact on your statistics... Your site is experiencing header problems which can be resolved be remarking line 403 within your main index.php parser file... Let us know if that resolves your problems... :eto:

#15 0zz

0zz

    Etomite Forum Fan

  • Member
  • Pip
  • 86 posts

Posted 17 May 2006 - 05:05 PM

sorry, guys..

excuse, my English, but REMARK means COMMENT?
ok, here is what i did with line 403 in my index.php file
  /* header('Content-Type: '.$type.'; charset='.$this->config['etomite_charset']); */  
but this doesn't help and numbers do not change properly..

#16 Ralph

Ralph

    Loves Etomite Forums!

  • Admin
  • 6,539 posts

Posted 17 May 2006 - 05:31 PM

sorry, guys..

excuse, my English, but REMARK means COMMENT?
ok, here is what i did with line 403 in my index.php file

  /* header('Content-Type: '.$type.'; charset='.$this->config['etomite_charset']); */  
but this doesn't help and numbers do not change properly..

Your site's error regarding headers has been resolved... I'm doing some digging and wondering if maybe there isn't a problem with how PHP 5 handles the crc32() function... Until I can dig deeper into this problem I'd suggest disabling visitor logging... The problem appears to be due to the fact that crc32($hostname) is returning a number which is out of the accepted range for an int(11)... :eto:

#17 0zz

0zz

    Etomite Forum Fan

  • Member
  • Pip
  • 86 posts

Posted 18 May 2006 - 05:17 AM

Thank you, Ralph, I've switched of the snippet.. Is there a way to "zeroize" the log?

#18 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,790 posts

Posted 18 May 2006 - 09:38 AM

You need to empty the _log* tables in phpMyAdmin.

#19 Ralph

Ralph

    Loves Etomite Forums!

  • Admin
  • 6,539 posts

Posted 18 May 2006 - 01:26 PM

Or try Etomite Manager > Visitor Stats > Summary Tab > Empty visitor logging tables... :eto:

#20 0zz

0zz

    Etomite Forum Fan

  • Member
  • Pip
  • 86 posts

Posted 22 May 2006 - 12:58 PM

sorry for bumping the topic again... is this a common mistake that I can fix by myself? Or this is related to hosting?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users