Refactors tracking, adds appiId and appName