Odoo Help


How to implement Google Tag Manager?

on 9/16/15, 10:43 AM 3,116 views

I would like to implement Google Tag Manager (https://developers.google.com/tag-manager/quickstart) in our Odoo installation, but I can not find much information on the topic.

I tried to put the Google Tag Manager code via the website HTML editor just beneath the body tag (as required by Tag Manager) but it results in a XML Malformed error.

Does anyone know how to implement Google Tag Manager within Odoo?

Sofie Van Looveren
On 5/23/16, 1:26 AM

We faced the same problem. To be able to add the tag manager to the main layout we updated the & (ampersand) to &

This fixed the XML Malformed error.

<!-- Google Tag Manager -->
<iframe src="//www.googletagmanager.com/ns.html?id=GTM-XXXX" height="0" width="0" style="display:none;visibility:hidden"></iframe>
'gtm.start':new Date().getTime(),event:'gtm.js'});
var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&amp;l='+l:'';
<!-- End Google Tag Manager -->

If this appears in the developer console of the browser:
Failed to load resource: the server responded with a status of 404 () - https://www.googletagmanager.com/gtm.js?id=GTM-XXXX

Replace the id GTM-XXXX with your personal Google id.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 9/16/15, 10:43 AM
Seen: 3116 times
Last updated: 5/12/17, 8:36 AM