-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customizeable / Extendable Visitor Profile & Visitor Log #11579
Conversation
d37d772
to
b34f7fc
Compare
9505fa3
to
393c88e
Compare
FYI: An issue I ran a few times into when extending the visitor logs eg via event or so is that most of the events are methods / hooks are triggered per visitor. When showing like 250 or up to 500 visits on one page, we might do 500 times a SQL query for each plugin that hooks into. For example plugins would check if there is a custom dimension, or media views, form interactions, recorded sessions, etc. They are all in different tables etc and query per visitor. It would be great if there was like an event or method / hook that gives you the row of visitors so it is more efficiently possible to fetch in one query the data (eg using |
plugins/Actions/VisitorDetails.php
Outdated
log_link_visit_action.interaction_position | ||
" . $sqlCustomVariables . ", | ||
log_action_event_category.name AS eventCategory, | ||
log_action_event_action.name as eventAction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: Not needed for now but eventually we also need to fetch log_link_visit_action.idpageview
as other plugins will likely hook into individual actions based on the idpageview. I will add this likely once needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add log_link_visit_action.idpageview
71e882c
to
aa12678
Compare
CHANGELOG.md
Outdated
@@ -18,6 +18,7 @@ The Product Changelog at **[piwik.org/changelog](http://piwik.org/changelog)** l | |||
### Breaking Changes | |||
* New config setting `enable_plugin_upload` lets you enable uploading and installing a Piwik plugin ZIP file by a Super User. This used to be enabled by default, but it is now disabled by default now for security reasons. | |||
* New Report class property `Report::$supportsFlatten` lets you define if a report supports flattening (defaults to `true`). If set to `false` it will also set `ViewDataTable\Config::$show_flatten_table` to `false` | |||
* The event `Live.getAllVisitorDetails` has been deprecated and will be removed in Piwik 4. Use a `VisitorDetails` class instead (see Live plugin). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Let's add a test for this deprecation in tests/PHPUnit/Unit/DeprecatedMethodsTest.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to test a deprecated Event? Did we do that for other Events before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably we can't do this. So maybe we just create an issue in Piwik 4 milestone instead?
This looks promising 👍
We might need to move this into 3.1.0 release as I assume it won't be finished in time for 3.0.4? |
dcd2e48
to
1af4204
Compare
* update piwik-icons submodule * fix some system tests * update screenshots
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Looks much better, nicely done 👍
- Noticed the XML export contains invalid XML ie.
<Apple iPhone>1</Apple iPhone>
, example url
<devices>
<Smartphone>
<count>1</count>
<icon>plugins/Morpheus/icons/dist/devices/smartphone.png</icon>
<devices>
<Apple iPhone>1</Apple iPhone>
</devices>
</Smartphone>
</devices>
plugins/Actions/lang/en.json
Outdated
@@ -42,7 +42,9 @@ | |||
"PagesReportDocumentation": "This report contains information about the page URLs that have been visited. %s The table is organized hierarchically, the URLs are displayed as a folder structure.", | |||
"PageTitlesReportDocumentation": "This report contains information about the titles of the pages that have been visited. %1$s The page title is the HTML %2$s Tag that most browsers show in their window title.", | |||
"PageUrls": "Page URLs", | |||
"PageViewsByVisitor": "Number of times this page was seen in all visits by this visitor", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest instead: Number of times this page was viewed by this visitor across all visits.
(edit: this was an old comment I forgot to mention, but maybe this string is not used anymore)
We reviewed with Thomas and here is additional feedback:
|
I've fixed all layout issues. Regarding the speed issue: No, I hadn't reverted the sql changes. But the query is now slower for sure, as it contains four more joins for selecting the content interactions. You could try to disable the contents plugin and compare the speed then (that should remove the extra joins). I'm not sure if I will have some time to profile that tomorrow. |
35b917d
to
c83597e
Compare
c83597e
to
ea43e85
Compare
Merged! 🎉 Still we do need to look at the performance issue because it's important that Visitor log loads fast 100 visits at once. Please share what you find in Profiling? if we need to set it up on demo2 let me know. |
… merged This reverts commit d833d30.
Proposed changes to the way how visitor log and profile are created:
Introduces new classes (named VisitorDetails) that can be implemented in every plugin.
With this classes the visitor and action data used for the Live plugin can be provided, filtered and manipulated. Additionally the classes can define extra content to be rendered in visitor log & profile
Additional changes / improvements
fixes #6111
refs #9507
layout changes also fixes #11589