js fix for analytics