As part of a website I am building for work, one of the requirements is to have some statistics.
I would like to do this:
- Know what words were used on a search engine - if that's how they found the site
- Know how long they spent in total on the website
- Perhaps also know which products they viewed (probably similar to number 2)
I'm really unsure how this could be done. I have a feeling sessions would be required, but I am really unsure how to tell when the user has left the page.
Any ideas?