you might want to check out awstats (emerge awstats) it's a very in-depth 
apache log analyser that'll parse combined-formated log files to capture all 
sorts of handy information and graph it to be pretty too ;-)

barring that, you could write your own php (or whatever language you like) 
-based script to handle pixel calls.  something like this:

the page you track includes html display of a pixel.  the img call for the 
pixel looks like this:

  <img
  src="/pixel.php?name1=value&name2=value"
  width="1"
  height="1"
  alt="tracking pixel"
  />

you can use your own code (even javascript if you wanna capture neat stuff 
like client resolution and colour depth) and pass that in the query string to 
your tracking server.  your tracking code will look something like this:

  <?
    // capture query string data
    foreach ($_GET as $name => $value) {
      // do some logging of some kind
    }
    header('Content-type: image/gif');
    header('P3P: CP="NOI NID ADMa OUR IND UNI COM NAV"');
    header('Expires: Sat, 22 Apr 1978 02:19:00 GMT');
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Cache-Control: no-store, no-cache, must-revalidate');
    header('Cache-Control: post-check=0, pre-check=0', false);
    header('Pragma: no-cache');
    printf(
       
'%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%',
       
71,73,70,56,57,97,1,0,1,0,128,255,0,192,192,192,0,0,0,33,249,4,1,0,0,0,0,44,0,0,0,0,1,0,1,0,0,2,2,68,1,0,59
    );
  ?>

that'll output a transparent gif and make sure that it's not cached so you can 
continue to log repeated page calls.

hope that helps ;-)


-- 
keep away from people who belittle your ambitions.  small people always do 
that, but the really great make you feel that you too can become great.
  - mark twain
-- 
gentoo-user@gentoo.org mailing list

Reply via email to