Refactor analytics for new API

Hopefully this is correct
Fiddle with Analytics some more
Add some resources

and add to credits