Edited Analytics code