update to analytics code