How to add Google Analytics Code

Please go to Appearance >> Customize >> Header >> Google Analytics and add your code inside the field as shown in the attached image. Please note that you do not need to add the opening tags since this will be dynamically added, so just add the code in between those lines as shown in image.