Jump to content

# of views counter on main site content


.josh

Recommended Posts

I just noticed that it even increments when you go to the next page of the tutorial/article/whatever.  I know it's possible for people to follow some link to a specific page of something, so that should count as a view, but I think having it increment on every page view like that is misleading, artificially bloating the numbers, etc.. (I'm sure this was not intentional, of course).

 

So I was thinking, maybe you could throw the IP address in a session var and check if it's there and the same from page to page, and not increment it if it is?  Or alternatively, throw a GET var onto your pagination to check if the person accessed the page from one of the other pagination links.  If they did, don't increment the counter. 

Link to comment
https://forums.phpfreaks.com/topic/130279-of-views-counter-on-main-site-content/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.