Added data analytics logic.