moved GA code to head