Add analytics code

Resolves #12
Merge pull request #17 from theodi/analytics

Add analytics code