Adds analytics code