Attempt 2 to add analytics