title: Storing/Tracking user activity on a website
body: <p>I was wondering what would be the best way to go about storing/tracking user activity on a website. I am thinking of user activity along the lines of which webpage a user visited,how many times has she visited,when(i.e timestamp) of his/her vists.</p>
  
  <p>I am currently thinking of creating multiple tables in my database for each webpage on my website, each of which would track an aspect of user activity on my site. E.g 1 table containing timestamp and userid of each user who visited that webpage, another table storing their actions done on the webpage(e.g liked something)</p>
  
  <p>Would this be a good way of tracking user activity or are there other, better methods of doing so?</p>
  
  <p>PS: Im using PHP and MYSQL for the website, and am doing this as a means of improving my coding so i won't be using google analytics or anything like it.</p>