Added analytics upload functionality.