where to put a "hit counter"

I plan to write a hit counter to record the following information:

userAgent

urlReferrer

url

userHostAddress

userHost

time, etc.

I am wondering how to implement this: an extention, module, or something different.

A widget. You can put this widget in the layout so that it is used for each page display. Inside the widget, you can then record the needed page request information.

Thanks, that is fast.

I will write the widget and then share it here once it is done.

moho can u share ur widget when done? thanks

if this is only viewable by you, you could always take advantage of google analytics, incredibly easy to install.  ;)

Hi, it is done for now and I am testing it. Currently it is implemented as a model with a seperate database. I will try to implement it as a widget later on.

DrakNSF, I am using google analytics but google does not record the following information:

IP address,

detailed agent info (such as what browser and what kind of computer),

detailed referral information,

detailed time of visit,

and more importantly, Yii-specific information such as username. :)

most of the data can be found in web server logs, such as apache custom log http://httpd.apache…ig.html#formats