Update to analytics code