Update analytics code

This sstill probably won't work.

Ready for v1.0.3 release