Changed trackEvents to include a category