Open fl0pedro opened 8 months ago
Hello @fl0pedro
Probably a good suggestion since it rarely (never?) make sense to put a script in the body anymore. We'd have to check what those libs recommend to be sure but I am guessing the <head>
section is what they'll recommend. I have created a task about this, someone will have a look although probably not as a huge priority. It would more than probably be for the next version though (not done as a fix in stable).
Note: dig around a little to know if we moved that in the body for any good reason: it was actually in the <head>
section before this change 9 years ago: https://github.com/odoo/odoo/commit/4e47f917dff837a5c1a5f04eb57cf57278284ccb ... another age where no justification was needed :grimacing: We'll look into it.
cc @rdeodoo
As the title explains, I suggest the Google Analytics and Plausible scripts to be moved from
body
tohead
as that is standard. Bellow is the line that would need to be changed:https://github.com/odoo/odoo/blob/97ccef050664bc8da6ac60ca94e126e8d9271739/addons/website/views/website_templates.xml#L203C17-L203C17
<xpath expr="//div[@id='wrapwrap']" position="after">
-><xpath expr="//head" position="inside">
@JKE-be @qsm-odoo