Not sure if it was the first but we brought out something called "Statman" back in 2001. It was a server side cgi script that worked a bit like google analytics (ie so you pasted a bit of script on your page to track it). Obviously not as powerful as todays analytics but it captured all the basic stats. Bear in mind this was before twitter, facebook and even google to a large extent.
We still use an upgraded version of it today to provide each of our webmodels with full stats for their sites

