[FIX] website: set proper async value for google tag manager script

W3C validation does not like async="1", there is not supposed to have
any value for this boolean attribute. "async" as value should be
accepted as a value is needed in this XML definition.

closes odoo/odoo#120311

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
qsm-odoo
2023-05-11 18:25:08 +02:00
parent 755e0a47b5
commit 46b271ac9e
+1 -1
View File
@@ -171,7 +171,7 @@
<xpath expr="//div[@id='wrapwrap']" position="after">
<t t-if="website and website.google_analytics_key and request.env['ir.http']._is_allowed_cookie('optional') and not editable">
<script id="tracking_code" async="1" t-attf-src="https://www.googletagmanager.com/gtag/js?id={{ website.google_analytics_key }}"></script>
<script id="tracking_code" t-attf-src="https://www.googletagmanager.com/gtag/js?id={{ website.google_analytics_key }}" async="async"/>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}