analytics.js

* support for analytics.js #19 
* refactored view helper
* fixes and improvements
* factories in sm