Today I finished writing and installing new site page counters. For most readers, this may be a curiosity at best. For some, a “why are you bothering us with this?” moment. For me, it’s a convenience. For our HOME page, it’s a more accurate counter.
1. HOME COUNTER: The old HOME counter has always reflected the actual page hit counts we’ve been tracking since 1995. When we changed servers in May 2013, I had to rewrite the counter. To reduce database calls, I wrote counters to a flat file, which periodically broke. Worse, I believe it inflated the counts. I finally got tired of fixing that data file.
The result is a new routine that writes the count to the database (again), so there is no file to break. The code executes inside a new WordPress PHP Code widget. As far as I can tell, my code increments by exactly one every time the page is loaded, never more or less. Thanks to you, our readers, the current HOME page count is somewhat over two million.
2. NEW DEPARTMENT COUNTERS. As a result of this effort, I was finally able to port my new code routine over to each of the other 9 departments. In the Sidebar of each department home page, COUNTER appears at the top. Department counts restart at 1. You’ll see counts ranging from 21 to a few hundred, and climbing from there.
I felt I had to drop multiple page counters when I went over to WordPress around ten years ago. I used to keep page counts for Photos, Commentary and so forth, on our old HTML pages, but that’s all ten year old data now. I just started over at zero. It is easier for me to look at the page, than look up server stats on the server, which is why I never did.
6,344 total views, 5 views today