Skip to Content
Menu
This question has been flagged
3 Replies
5010 Views

Dear community,

I am running few Odoo 12 CE instances on mydomain1.com , mydomain2.com ... all with Google Analytics activated. Corresponding Tracking ID attached. All works ok. Recently I have released Odoo13 CE on mydomainX.com. I have attached a Google Analytics tracking ID as usual Settings->Web Site->Tracking ID. But GA doesn't track visits on Odoo13 CE instance. I have checked my Chrome Tag Assistant plugin and it doesn't finds any ID of GA...i opened all mydomains.com and Tag Assistant shows ID on all Odoo12 CE implementations but only to Odoo13CE implementation no tracking ID... any ideas what could be wrong with Odoo13 CE GA tracking ID?

Avatar
Discard
Author Best Answer

Problem solved! I did a fresh odoo 13 CE instance. Problem remained! Still had no GA tracking. I digged down the code and found that in Main Layout template which is in database Settings > User Interfaces > Views > Main layout (website.lyout) the code is ga('create', _.str.trim('<t t-esc="website.google_analytics_key"/>'), 'auto'); then i went to file addons/website/views/website_templates.xml line 297 and checked the code which was the right one ga('create', '<t t-esc="website.google_analytics_key"/>'.trim(), 'auto'); Don't ask me why in xml file the code is different than this in database, even after a fresh install. Maybe some Odoo guru can explain? Anyway go back to Settings > User Interfaces > Views > Main layout (website.lyout) , use Edit, find the wrong code and change it to right one : ga('create', '<t t-esc="website.google_analytics_key"/>'.trim(), 'auto'); Save...and go check GA, now it works !!!

Avatar
Discard
Best Answer

So I looked and found that I have the correct code snippet you have listed but still getting this issue.  still looking into the root of why this error pops up.  CE 13

Avatar
Discard
Best Answer

Glad you found the solution yourself, Mihail.

I'm going to work with a main website and multiple subdomains of that main website in Odoo CE 13.

I was wondering whether Odoo 13 uses Google Universal Analytics or Google Tag Manager.

Any tips you can give me about setting up Google Analytics for that in a correct way?

Avatar
Discard