What is the best way to track page views? For instance: SO has how many views a Question has, yet hitting refresh doesn't up the view count.
I've read that using cookies is a pretty good way to do so, but I'm at a loss on how this doesn't get out of hand.
I've searched all over and can't find a good answer for this.
EDIT:
I also see that another option (once again I could be horribly wrong) is to use Google Analytics API to get page views. Is this even an viable option? How does Stackoverflow, youtube, and others track their views?