diff --git a/extensions/odoo_theme/layout.html b/extensions/odoo_theme/layout.html index 6592e8f04..eb4a42d74 100644 --- a/extensions/odoo_theme/layout.html +++ b/extensions/odoo_theme/layout.html @@ -51,6 +51,7 @@ #} {% block footer %} {%- if google_analytics_key -%} + {# FIXME VFE bring back old logic, it cannot be specified in a js file. #} {%- endif -%} diff --git a/extensions/odoo_theme/static/js/google_analytics.js b/extensions/odoo_theme/static/js/google_analytics.js index 3d34df7cb..5630c5fb2 100644 --- a/extensions/odoo_theme/static/js/google_analytics.js +++ b/extensions/odoo_theme/static/js/google_analytics.js @@ -3,6 +3,7 @@ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); +// VFE FIXME, the {{}} is jinja code, it cannot be moved in an independent js code :P ga('create', '{{ google_analytics_key }}', 'auto'); ga('set', 'anonymizeIp', true); ga('send','pageview'); \ No newline at end of file