added analytics data gathering