Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3527 Lượt xem

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.



Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 6 25
25012
2
thg 7 22
4194
1
thg 9 21
3816
3
thg 9 21
8607
2
thg 9 21
9468