fix analytics tracking code bug