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.

5

Error in Google analytics tracking code

By
Jean-Marc Dupont
on 10/8/14, 8:04 AM 2,612 views

In the last version of Odoo (8.0), the javascript code generated by Odoo for Google Analytics doesn't work any more (no stats are returned by Google Analytics)

After investigating, I found the error (in website_templates.xml) :
Instead of :
 ga('create', '<analytics-id>', 'auto');
the new version of Odoo generates :
ga('create', _.str.trim('<analytics-id>'), 'auto');

which causes an error in Google analytics stat generation

 

I have some problem here... it's obvious just remove '_.str.trim' will works again. but I think we should fix the problem the right way. Have you find a better way to fix that?

Rui Andrada
on 10/17/14, 7:29 AM

Post an issue on Github

6 IT, Jean-Marc Dupont
on 10/17/14, 7:56 AM

it's fixed as per 12-01-2015 on github. Don't know if it's already in master.

Martin Temmink
on 2/20/15, 7:36 PM

it's fixed as per 12-01-2015 on github. Don't know if it's already in master.

Martin Temmink
on 2/20/15, 7:36 PM
0
Massinissa Belkassam
On 6/18/15, 4:02 AM

You can easily fix it by editing website_templates.xml with a text editor.

This file is located in your_path_to_odoo/addons/website/views/website_templates.xml (For example: /opt/openerp/odoo/appserver-dts-v8/parts/odoo-8.0-20150210/openerp/addons/website/views/website_templates.xml)

To have access to this path you need to be connected in SSH with a tool sush as Bitvise SSH Client.

0
Joseph Andrade
On 5/29/15, 7:39 AM

How do we get the fix for this? Thanks in advance.

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

4 follower(s)

Stats

Asked: 10/8/14, 8:04 AM
Seen: 2612 times
Last updated: 11/20/15, 4:17 AM