modify some analytics code