CodeIgniter Forums

Full Version: Page view tracking
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?

I use Matomo (formerly Piwik) - It is similar to Google Analytics and it is open source (so you can install it on your servers).
@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.