Help - Search - Members - Calendar
Full Version: Counter for site
Movable Type Community Forum > Additional Resources > Tips and Tricks
dgraver
So, I'm curious to see how many people are coming to my site these days...specifically which entries are the most hit.  Are there any recommendations for a counter that can keep track of each individual entries hits, as well as one for the main page, etc.  

I'd like to use some sort of simple PHP include that I could add into the templates.  I found this one from the php-princess simple counter, as well as this one from LogitPro, but they look like they will only keep track of one page, and would require work each time you add a new entry.  Any thoughts would be appreciated.
mversion
I use webanalyse, very simple, and all the information you need about your visitors are neatly packed on the one screen.

Use the following code at the very top of your pages/MT templates etc...

CODE
<?php require("path/to/include/stats_main.inc");
  $stats = new init(true, '/path/to/stats/'); ?>


Just make sure you know the absolute path... typcially home/user/public_html/

Hope that helps.
dgraver
Webanalyse is nice, other than the fact it's in German, but I don't think it can do what I am asking.  Since my archives are stored individually, I would like to know which of my entries are getting the most hits (via google or whatever).  Basically I am looking for a way to monitor hits for each individual entry.  

What I am thinking is that every time I enter a new entry...a new counter is basically created.  Then I can go into a general webpage and see which entries are getting hit on the most.  With webanalyse it will just tell me everytime someone hits anywhere in my site, but not specifically where they went.  Thanks.
dgraver
I apologize...it looks as if it does keep track of which pages are hit.  Thanks.
cembra
It's in French for me.

Cembra
stepan
QUOTE
It's in French for me.

Heh  :D

You can see it in english on webanalyse.sourceforge.net, too.
sjhkiwi
Help please.  

I uploaded Webanalyze to my site and added the suggested code to my templates. I also chmod the log file.  

 $stats = new init(true, '/home/xxxx/public_html/stats/'); ?>


I get the following... (webanalyze directory was renamed "stats")

Warning: OpenDir: Permission denied (errno 13) in /home/xxxx/public_html/stats/include/stats_main.inc on line 205

Warning: stat failed for ./log/__tyear.ser (errno=13 - Permission denied) in /home/xxxx/public_html/stats/include/stats_main.inc on line 577

Presume it is something silly.  Am I coding this correctly?

Thanks
dgraver
Well...maybe its French, either way I didn't understand it until I found the English version.

As for your problems regarding the stats directory...it needs to point to whatever the name is of the directory you unzipped everything into.  In regards to the log directory, I think it is an error in the readme...instead of setting it to 770 try 777.  If anyone knows if this will be a security risk, please let me know.  Thanks.

Although, I haven't gotten the graphics working yet, so let me know if anyone figures that one out.
sjhkiwi
Well Chmod to 777 kissed away the two gremlins.  I'm left with "No entry logged by the Maggot for the Moment, sorry !"

It still doesn't seem to log the details.  In other words the log is not accumulating.  Maybe I need an EEC passport?

huh.gif
dgraver
Not sure what the EEC passport thing is...but make sure your paths are absolute, not relative to the web.  Also make sure they are pointing to the right file.  

I have you hit your site and then gone to check analysis?  

Otherwise, not sure what to tell you...sorry.
mversion
I checked your site, your archives at least have the html extension. You need to rename your files with the .PHP extension.
Or if you have access to your control panel you can have html parsed by PHP.

Log into your Control Panel. Under Advanced Menu you should see Mime Types. Add the following:

Mime Type: application/x-httpd-php
Extension(s): html .htm

From now on your html files will also be treated as php files.

I think that should help.
latimere
I've got webanalyse running, with the exception of getting the graphs to generate. Does anyone have this functionality working, and if so, was there anything in particular you needed to do to achieve this?

AN
mversion
It's automatically up and running on my installation. You didn't need Image::Magick or the kind as far as I can remember either.

What does it say when you right-click and check on its properties, if you are able to?
latimere
I've got it working now - I had to install the GD module for PHP before it would work. They should mention this in the install instructions, but it's all good now smile.gif
nammer
Just to clarify for the interested; I included the logitpro info in my sidebar, which is included using PHP on every page of my site. You do need to use PHP to make it easier to insert, but you don't need to insert the counter manually every time you create an entry.

This thread discusses several host-based hit counters (logit pro and others), and this thread discusses converting to PHP.

Donna
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.