Fixed some analytics code to make it reflect what the spec actually
wants