-
- Downloads
[IMP] website : add website visitors activity tracking
This commit adds the website_visitor model that will be used to track website visitor activity (page viewed, number of visits and more general info about the visitor (country, lang, etc..) This model will, in later commit, be used to send chat requests and push notification from the operators (or backend users) directly to the visitor. - A website_visitor is created once the visitor is requesting a website.page that is tracked. - A website_visitor is considered as connected if his last tracked website_page request is within the last 5 minutes. - The number of visits for a website_visitor is incremented if his last tracked website_page request was at least 8 hours ago. - A website_visitor is only handled by the system. Users cannot create, edit or delete a website_visitor. - A unique website_visitor is created per website. That means that the same real person can triggers multiple visitor creation if visits multiple websites. This is because, for livechat purpose on later commit, for example, the chat request can be created on the correct livecaht channel (linked to the correct website) - The visitor is recognized via his cookie (visitor_id). So if the visitor flush his cookies, a new visitor will be created the next time he will request a tracked website_page. - Link user's res.partner to website.visitor. If a website_visitor log in (a visitor that has visitor_id in his cookie), the website_visitor is linked to the res.partner. The website visitor name is than adapted to match the name of the first res.partner linked to the visitor. A visitor can have multiple partners as the same session can be used by multiple person (one PC for a team for example). To keep a detailed history of the visitor page views, we add a website.visitor.page model that makes the link between visitor and website.page but that keeps the visit date. So that we can see if a visitor went mulitple times on the same page and when. It's usefull to see his last page views. Task ID : 2028059 PR #34624
Showing
- addons/website/__manifest__.py 2 additions, 0 deletionsaddons/website/__manifest__.py
- addons/website/data/website_data.xml 3 additions, 0 deletionsaddons/website/data/website_data.xml
- addons/website/data/website_visitor_cron.xml 14 additions, 0 deletionsaddons/website/data/website_visitor_cron.xml
- addons/website/models/__init__.py 1 addition, 0 deletionsaddons/website/models/__init__.py
- addons/website/models/ir_http.py 14 additions, 0 deletionsaddons/website/models/ir_http.py
- addons/website/models/res_partner.py 3 additions, 1 deletionaddons/website/models/res_partner.py
- addons/website/models/res_users.py 16 additions, 0 deletionsaddons/website/models/res_users.py
- addons/website/models/website_page.py 1 addition, 0 deletionsaddons/website/models/website_page.py
- addons/website/models/website_visitor.py 143 additions, 0 deletionsaddons/website/models/website_visitor.py
- addons/website/security/ir.model.access.csv 4 additions, 0 deletionsaddons/website/security/ir.model.access.csv
- addons/website/static/src/scss/website.backend.scss 9 additions, 0 deletionsaddons/website/static/src/scss/website.backend.scss
- addons/website/tests/__init__.py 1 addition, 0 deletionsaddons/website/tests/__init__.py
- addons/website/tests/test_website_visitor.py 38 additions, 0 deletionsaddons/website/tests/test_website_visitor.py
- addons/website/views/website_views.xml 16 additions, 0 deletionsaddons/website/views/website_views.xml
- addons/website/views/website_visitor_views.xml 199 additions, 0 deletionsaddons/website/views/website_visitor_views.xml
- odoo/tools/misc.py 0 additions, 1 deletionodoo/tools/misc.py
- odoo/tools/translate.py 33 additions, 0 deletionsodoo/tools/translate.py
Loading
Please register or sign in to comment