CodeIgniter Forums
Page view tracking - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: Page view tracking (/showthread.php?tid=76703)



Page view tracking - jhob - 06-11-2020

I manage a large CodeIgniter 3 site that keeps track of page views by writing to a database table. 

This sort of works fine, however we're getting scalability issues as it's now has over 3 million rows tracking roughly 600,000 pages.  I'm not convinced it's even working as it should be as there should be vastly more page views than this - google analytics has recorded over 4 million hits in the last year alone and the site has been running for 4 years. 

The number of hits is shown on each page (content is user contributed and they like to see how their uploads are doing)

I've got a few options:
  • Re-write so that it aggregates the pages views at the end of each month and accurately records the hits
  • Find an off-site analytics tracking solution
  • Somehow integrate with Google Analytics to pull the publicly displayed stats from there
  • Use a CI library that handles all of this properly
  • Somehow integrate with AWStats which is already on the server
How have others in a similar situation handled this issue?  Can anyone point me towards which solution might best suit the situation?


RE: Page view tracking - php_rocs - 06-11-2020

@jhob

I use Matomo (formerly Piwik) - https://matomo.org/. It is similar to Google Analytics and it is open source (so you can install it on your servers).


RE: Page view tracking - jhob - 06-11-2020

@php_rocs that does look like it has potential. I can see how the Embedded reports feature or the static image graphs could be used for the on-page reporting. Just need to work out if you can get them to display data vis report/static image at the single page level.