added analytics and event tracking