Editing <HEAD> and <BODY> to allow Google Tags

Can anyone advise how to edit the <HEAD> and <BODY> so that it is possible to add google tags to the pages?

Ideally I’d like to do this once so it adds to every app I have now and in the future - am I missing a setting somewhere?