Odoo Help

Welcome!

This community 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.

0

How to implement Google Tag Manager?

By
MRG
on 9/16/15, 10:43 AM 1,154 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?

0
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 -->
<noscript>
<iframe src="//www.googletagmanager.com/ns.html?id=GTM-XXXX" height="0" width="0" style="display:none;visibility:hidden"></iframe>
</noscript>
<script>
(function(w,d,s,l,i){
w[l]=w[l]||[];w[l].push({
'gtm.start':new Date().getTime(),event:'gtm.js'});
var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&amp;l='+l:'';
j.async=true;
j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;
f.parentNode.insertBefore(j,f);
})
(window,document,'script','dataLayer','GTM-XXXX');
</script>
<!-- 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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 9/16/15, 10:43 AM
Seen: 1154 times
Last updated: 8/1/16, 2:57 AM