Updated Analytics Code