Code now records time spent on a webpage and amount of times visited webpage