[Zope] How do you track if somebody leaves your site..?

Spicklemire, Jerry Jerry.Spicklemire@IFLYATA.COM
Fri, 2 Mar 2001 11:40:20 -0500


Stoons asked:

> Can somebody tell me how to track if someone "leaves" the Zopeserver..?

It depends on how they "leave" your site.

If they type an URL in the "location" bar of their browser, you're 
out of luck as far as detecting exactly what that URL was.


On the other hand, if they click a link on a "page" of a Zope site, 
that link can in fact point to another "page" that is really a Zope 
method (script, whatever) that logs the click. 

Then, the  meta-refresh* idea can be applied to re-direct to the 
final destination, which would have been passed as a parameter of 
the original link. You could also use a true HTTP redirect:

 <dtml-call "RESPONSE.redirect('finalURL')">

where 'finalURL' is a <dtml-var> representing the destination URL.


You might also want at look at Petru Paler's ClickTracker:

"This product logs clickthroughs to foreign (or local) URLs in 
a SQL database. The data gathered with it is useful to generate 
reports about where your site's visitors go."

 http://www.zope.org/Members/ppetru/ClickTracker

Later,
Jerry S.

* search at NIP for "meta-refresh"
 http://zope.nipltd.com/public/lists/zope-archive.nsf/$$Search?OpenForm