Forum Moderators: buckworks & skibum

Message Too Old, No Replies

Analytics vs. Log

Analytics vs. Log

         

riisager

9:44 am on May 29, 2006 (gmt 0)

10+ Year Member



Hi experts

I have af PHP script there log and count IP adress from all visitors


$ip = getenv("REMOTE_ADDR");
$fil = "count.txt";
$f = file($fil);
$antal = count($f);
$yest = time() - 6400;
$o = "0";
$xidag = "f";
$idag = time();
$idag2 = date("Y F d, H:i");
while ($antal > $o) {
$streg = explode(" ", $f[$o]);
if ($ip == $streg[0]) {
$x = "t";
if ($streg[1] > $yest) {
$xidag = "t";
}
}
$o++;
}
if ($xidag == "f") {
$logg = fopen("$fil", "a");
fputs ($logg, "$ip $idag, $idag2\n");

fclose ($logg);
}
$f = file($fil);
$antal = count($f);
if ($x == "t") {
// Hvis man har været der før...
print "Welcome back $antal ";
}
else {
print "Counts $antal ";
}
?>


I do not understand why the script counts over 100 visitors(day) and Google analytics only counts about 10 visitors - offcause some of them are bots, but its not explane all of them

ex.
28/5-2006 - the script counts 177 ip - GA counts 5?

[edited by: eWhisper at 12:34 pm (utc) on May 30, 2006]
[edit reason] Please don't drop links, See TOS. [/edit]

Receptional

9:48 am on May 29, 2006 (gmt 0)



[webmasterworld.com...] should help start to answer your question.

In short, unique IP numbers do not measure unique users.

riisager

1:32 pm on May 29, 2006 (gmt 0)

10+ Year Member



thx