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
New "Event URL" segment eventUrl
to segment on any Segment URL
#12236
Conversation
plugins/Events/Columns/EventUrl.php
Outdated
{ | ||
protected $columnName = 'idaction_url'; | ||
protected $columnType = 'INTEGER(10) UNSIGNED DEFAULT NULL'; | ||
protected $segmentName = 'EventUrl'; |
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 think this should be eventUrl
plugins/Events/Columns/EventUrl.php
Outdated
class EventUrl extends ActionDimension | ||
{ | ||
protected $columnName = 'idaction_url'; | ||
protected $columnType = 'INTEGER(10) UNSIGNED DEFAULT NULL'; |
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.
columnType
needs to be removed otherwise we maybe try to install it again. Might not cause any trouble but ideally this should not be defined twice as we are not sure how system reacts.
I think tests need to be fixed but otherwise 👍 |
be17984
to
84b02aa
Compare
I noticed the same issue. @sgiehl could you investigate more and see if you can generate test data and how? would be great to merge this one asap |
Useful for many use cases for example: * Creating Custom Reports such as "Top page URLs by Event action" * Segmenting by Event URL and view events triggered on a specific Page URL * Fixes #11131 Action URL segment could filter both Page URLs OR Event URLs (as advertised originally in the 2.16.0 changelog but it wasn't actually fully working yet)
…k_visit_action table
@@ -221,6 +221,7 @@ public static function flattenVisitorDetailsArray($visitorDetailsArray) | |||
$flattenForActionType = array( | |||
'outlink' => 'outlinkUrl', | |||
'download' => 'downloadUrl', | |||
'event' => 'eventUrl', |
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.
this was needed to get suggested values for this segment
I've now figured out why there weren't any suggest values. But unfortunately there still seems to be a bug in the segment itself. It does not seem to work, as there aren't any matches. Weren't able to get any results in segmented visitor logs. It seems the changes in TableLogActions (https://github.com/piwik/piwik/pull/12236/files#diff-fdad89cc205c1e002ab8f49d1cd3ab76) prevents any results. Not sure yet how to fix it. Guess I need to dig a bit deeper |
@@ -0,0 +1,12 @@ | |||
<?xml version="1.0" encoding="utf-8" ?> | |||
<result> | |||
<nb_visits>0</nb_visits> |
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.
we would expect the results to show some visits / actions for this eventUrl ?
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.
besides the test case not showing data, looks good 👍
@mattab my last changes should fix it. the eventurl is stored without protocol, so it needs to be removed from suggested values. |
Looks good @sgiehl There is only one last failing test in CustomDimensions:
Could you maybe merge the PR afterwards once tests green? |
That needs to be updated in customdimensions plugin. We can do that after
merge as well.
|
Ok will merge now 👍 Thanks for the work on this! |
Useful for many use cases for example:
TODO: