analytics moved to javascript view