CON-1784 | moved tracking functions building from controllers to the views