updated track method to record the event that was passed in