tweaking analytics code