updated analytics code, minor details