set up routes and controller for analytics