title: Codeigniter user tracking for visitors
body: <p>I am working on Codeigniter site and trying to implement <strong>User tracking functionality for visitors</strong> only (not registered users).</p>
  
  <p>I want to track ( ip address, from_page, to_page, time_stamp) on every page redirect and as I want to track only temporary users I would need to access database too, to check whether account exists or not.</p>
  
  <p>My question is where to write my code, so that Codeigniter automatically checks before each redirect, (keep in mind, that place should have rights to access database or sessions).</p>
  
  <p>Checking in each controller file will make so much redundant code and I don't think htaccess file could do it .</p>
  
  <p>-Thanks</p>