added the analytics code
merged conflicts