Custom Layouts module is available with Astra Pro. It provides hooks so that you can insert custom code at various locations on the website without editing the theme』s core files.
Please follow the steps to add Google Analytics code-
Activate the Custom Layouts module from Astra Pro. Insert the code in the Code Editor.Select Hooks layout and add wp_head action.Choose to display it on the Entire WebsitePublish the layout.