Web analytics refactoring