Adding more crufty analytics code to be beautifuled later