Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
3549 Näkymät

Hi, 

I need to add a variable to matomo through the piwik analytics module, by javascritps tracking, adding a example line in the js code.
_paq.push (['setCustomVariable', 1, 'UserId', user_id, 'visit']);
but when I apply and save the change odoo deletes the line, any suggestions.
Thanks in advance.



Avatar
Hylkää
Tekijä Paras vastaus

Solved

You have to manually edit the piwik_website_analytics.py file and add the setCustomVariable to the 
javascript code.
 _paq.push (['setCustomVariable', 1, 'UserId', odoo.session_info.user_id, 'visit']);

The module must be reloaded, and from the back apply the change.

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
kesäk. 25
25028
2
heinäk. 22
4198
1
syysk. 21
3838
3
syysk. 21
8619
2
syysk. 21
9485