refactored view event tracking