Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3534 Visualizzazioni

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
Abbandona
Autore Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
giu 25
25014
2
lug 22
4196
1
set 21
3828
3
set 21
8613
2
set 21
9470