added analytics to prototype