add big g analytics and refactor base template