Added analytics event tracking
Fixed some analytics trackings.