added analytics and loading img