update analytics code
remove logging