I downloaded and installed Shaun Inman's Shortstat (found here).
Everything worked perfectly. The
trackme.php page (which tests if the code works) worked perfectly.
The problem was implementing.
The author said to implement
<?php @include_once($_SERVER["DOCUMENT_ROOT"]."/shortstat/inc.stats.php"); ?>
into any pages wishing to be tracked.
Okay. So I put this in the
header.php via WP 1.5's Theme Editor. Logic said that putting the code in
header.php would make the code go on all pages.
The problem was the code didn't work.
If you visited the test page, it recorded the visit.
If you visited a normal PHP page (without WP), it recorded the vist.
But any pages built via WP did not record the visit.
The code was inserted correctly. I put an
echo in the code, and it echoed back on all pages. If it echoes correctly, shouldn't it track correctly?
Does WP allow scripts to run (with MySQL functions and what have you) in 'themes'? Because it's got something to do with WP.
Try it yourself (prove me wrong please)
1. Visit my ShortStat site (You will have to type the address in manually:
2. Visit trackme.php (its a simple php page with the tracking code on it.)
3. Go back to my ShortStat site (
www.bugger.3rror.com/shortstat/). It should have recorded your visit.
4. Now go to a WP page, say the home page or a perma link. This has the same code as the trackme page.
5. Go back to my ShortStat page (
www.bugger.3rror.com/shortstat/). Did it record your visit? When I do it, it doesn't.