I am trying to add a gtag.js script to httpdocs/vendor/magento/theme-frontend-blank/Magento_Theme/layout/default_head_blocks.xml
I understand I should be overriding this file in my custom theme, and I will once I get it working.
The default_head_blocks.xml file is now as below:
The error message I get is.
1 exception(s):
Exception #0 (MagentoFrameworkConfigDomValidationException): Theme layout update file ‘/var/www/vhosts/iplus2.co.uk/httpdocs/vendor/magento/theme-frontend-blank/Magento_Theme/layout/default_head_blocks.xml’ is not valid.
Specification mandates value for attribute async
Line: 16
attributes construct error
Line: 16
Couldn’t find end of Start Tag script line 16
Line: 16
Opening and ending tag mismatch: head line 9 and script
Line: 16
Opening and ending tag mismatch: page line 8 and head
Line: 19
Extra content at the end of the document
Line: 20
Looks like some kind of syntax error, but I don’t understand why.
Can anyone help please, this has been driving me crazy for 2 days now!
Thanks Jim