Brown trousers time :~

Edmund von der Burg evdb at ecclestoad.co.uk
Thu Oct 11 10:16:44 BST 2007


If you can get away with putting javascript onto the pages you want to
track then you can use the clientside javascript to put together a GET
request with everything in it (including tracking cookie). This means
that your webserver can just be a static server which logs the
requests to a file which is then processed.

Makes the front end dead easy to do and even easier to scale. All you
need to serve is a bit of static javascript, and a gif. If you need to
scale just add boxes. Still leaves the tricky part of analysing the
data though.

I notice that Google analytics does this, as demonstrated by this gif
it requested:

http://www.google-analytics.com/__utm.gif?utmwv=1&utmn=1820567470&utmcs=ISO-8859-1&utmsr=1280x1024&utmsc=32-bit&utmul=en-gb&utmje=1&utmfl=9.0%20%20r45&utmdt=Astray.com&utmhn=astray.com&utmr=-&utmp=/&utmac=UA-64659-5&utmcc=__utma%3D230973199.2138113804.1184321403.1191571080.1192093967.4%3B%2B__utmb%3D230973199%3B%2B__utmc%3D230973199%3B%2B__utmz%3D230973199.1184321403.1.1.utmccn%3D(direct)%7Cutmcsr%3D(direct)%7Cutmcmd%3D(none)%3B%2B

Lyle - if you want to watch this sort of thing get the 'FireBug'
extension to FireFox and look at the 'net' tab, or install wireshark
which will let you capture _all_ traffic that occurs.



On 10/10/2007, Paul Orrock <paulo at digitalcraftsmen.net> wrote:
> Lyle - CosmicPerl.com wrote:
> > Paul Orrock wrote:
> >> If all this webserver is going to do is handle these clicks I would
> >> still bet on a lightweight perl http listener with all the click
> >> handling code build into it.
>
> I think what I was trying to get at was that the best way to do this
> would be to have the click tracking engine (that actually gets told by
> the browser "i have visted page x") completely outside the webserver
> serving the site.
>
> Client site www.foo.com can be served by any webserver / technology I
> want to. To use your tracking engine all I have to do is put a piece of
> html in my pages that requests an image of track.foo.com/image-CLIENTID.gif.
>
> track.foo.com is a simple http server which I'd probably base on
> something like Net::Server::PreFork and put in the bits of HTTP that I
> need to get the cookie, the referrer and the client id. It then stores
> these in the database or flat file and returns a 1px x 1px gif which can
> be set to not even display on most browsers by setting width and height
> to 0.
>
> There are a load of advantages to doing this, it's easily extensible,
> about as fast as you could make it without much effort, it's easily
> configurable and also you could compile it into an executeable to run on
> any platform, oh and the whole thing is written in perl. :-)
>
> Paul.
>
>


-- 
In reality I'm evdb at ecclestoad.co.uk - http://ecclestoad.co.uk


More information about the london.pm mailing list