Fix analytics error