Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Track Page Views using PHP

I'm looking for a way to track the number of visits to a page, without counting duplicates (like someone hitting refresh several times) and I'd like to figure out the best way to do it without keeping track of every single IP address to view the page. Perhaps a cookie? Any other suggestions?

like image 444
RobHardgoo Avatar asked Dec 06 '25 07:12

RobHardgoo


1 Answers

Either use Webalizer to analyse your logfiles or use Google Analytics to track those metrics for you or - if you are looking for an extendable and self hosted solution, try Piwik:

Piwik is a downloadable, open source (GPL licensed) real time web analytics software program. It provides you with detailed reports on your website visitors: the search engines and keywords they used, the language they speak, your popular pages… and so much more.

In any case, there is no reason to reinvent the wheel here. Also, the software mentioned above is only a tiny fraction of web analysis tools out there.

like image 167
Gordon Avatar answered Dec 07 '25 20:12

Gordon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!