title: How can I start logging user activity in a php/yii application?
body: <p>I am building a site that contains music teaching resources and exercises.  I would like for users to be able to log in and keep track of which lessons/exercises they have completed.  To do this I will need to log various events on the site such as viewing a lesson or answering an exercise question.  </p>
  
  <p>Some of these events will happen on page load - others might not be - for example a video lesson has finished.  Therefore I'm guessing the best way to do this would be with some kind of javascript ajax call that can add a row to the Event db table.  </p>
  
  <p>Is there a framework/established way of doing this - and if not what should I keep in mind to ensure that this logging does not slow down the user's experience in any way?  </p>
  
  <p>I hope that eventually my site will scale and am wondering if now is the time to try a nosql method of storing all these events.  Or would it be better just carry on using SQL until I get to the stage where SQL becomes a problem?</p>
  
  <p>Thanks!</p>