Added analytics tracking, minor bug fixes and shape db push