Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3512 มุมมอง

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.



อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

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.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มิ.ย. 25
24991
2
ก.ค. 22
4157
1
ก.ย. 21
3806
3
ก.ย. 21
8587
2
ก.ย. 21
9450