Added analytics example and written documentation