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
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5f70bff
New "Event URL" segment `eventUrl` to segment on any Segment URL
mattab 63bdb92
fix typo no capital letter
mattab 4d12eb9
remove column type to prevent new column being created in the log_lin…
mattab 39a76a8
set correct action type for segment eventUrl
sgiehl 798e543
modify test
sgiehl fd7c79e
eventUrl needs action data
sgiehl d90b777
fix suggested values for eventUrl
sgiehl 843c560
update test files
sgiehl 952aa8c
event url is stored without protocol
sgiehl a80bf82
update test file
sgiehl File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
/** | ||
* Piwik - free/libre analytics platform | ||
* | ||
* @link http://piwik.org | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later | ||
* | ||
*/ | ||
namespace Piwik\Plugins\Events\Columns; | ||
|
||
use Piwik\Columns\Discriminator; | ||
use Piwik\Columns\Join\ActionNameJoin; | ||
use Piwik\Plugin\Dimension\ActionDimension; | ||
use Piwik\Tracker\Action; | ||
|
||
class EventUrl extends ActionDimension | ||
{ | ||
protected $columnName = 'idaction_url'; | ||
protected $segmentName = 'eventUrl'; | ||
protected $nameSingular = 'Events_EventUrl'; | ||
protected $namePlural = 'Events_EventUrls'; | ||
protected $type = self::TYPE_URL; | ||
protected $acceptValues = 'The URL must be URL encoded, for example: http%3A%2F%2Fexample.com%2Fpath%2Fpage%3Fquery'; | ||
protected $category = 'Events_Events'; | ||
protected $sqlFilter = '\\Piwik\\Tracker\\TableLogAction::getIdActionFromSegment'; | ||
|
||
public function getDbColumnJoin() | ||
{ | ||
return new ActionNameJoin(); | ||
} | ||
|
||
public function getDbDiscriminator() | ||
{ | ||
return new Discriminator('log_action', 'type', Action::TYPE_EVENT); | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletions
20
...t/System/expected/test_AutoSuggestAPITest_actionUrl__API.getSuggestedValuesForSegment.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<result> | ||
<row>http://piwik.net/grue/lair</row> | ||
<row>http://piwik.net/space/quest/iv</row> | ||
<row>http://example-outlink.org/1.html</row> | ||
<row>http://piwik.net/grue/lair</row> | ||
<row>http://example.org/path/file1.zip</row> | ||
<row>http://example.org/path/file0.zip</row> | ||
<row>http://example-outlink.org/1.html</row> | ||
<row>http://example-outlink.org/0.html</row> | ||
<row>http://example.org/path/file2.zip</row> | ||
<row>http://example.org/path/file3.zip</row> | ||
<row>http://example-outlink.org/3.html</row> | ||
<row>http://example.org/path/file3.zip</row> | ||
<row>http://example-outlink.org/2.html</row> | ||
<row>http://example.org/path/file2.zip</row> | ||
<row>http://example-outlink.org/7.html</row> | ||
<row>http://example-outlink.org/8.html</row> | ||
<row>http://example.org/path/file4.zip</row> | ||
<row>http://example.org/path/file5.zip</row> | ||
<row>http://example.org/path/file8.zip</row> | ||
<row>http://example-outlink.org/6.html</row> | ||
<row>http://example-outlink.org/7.html</row> | ||
<row>http://example-outlink.org/5.html</row> | ||
<row>http://example.org/path/file6.zip</row> | ||
<row>http://example-outlink.org/4.html</row> | ||
<row>http://example-outlink.org/5.html</row> | ||
<row>http://example.org/path/file8.zip</row> | ||
<row>http://example.org/path/file7.zip</row> | ||
<row>http://example-outlink.org/8.html</row> | ||
<row>http://example.org/path/file6.zip</row> | ||
<row>http://example.org/path/file5.zip</row> | ||
</result> |
18 changes: 9 additions & 9 deletions
18
tests/PHPUnit/System/expected/test_AutoSuggestAPITest_actionUrl__VisitsSummary.get_range.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<result> | ||
<nb_visits>18</nb_visits> | ||
<nb_actions>18</nb_actions> | ||
<nb_visits_converted>18</nb_visits_converted> | ||
<bounce_count>18</bounce_count> | ||
<sum_visit_length>0</sum_visit_length> | ||
<max_actions>1</max_actions> | ||
<bounce_rate>100%</bounce_rate> | ||
<nb_actions_per_visit>1</nb_actions_per_visit> | ||
<avg_time_on_site>0</avg_time_on_site> | ||
<nb_visits>17</nb_visits> | ||
<nb_actions>77</nb_actions> | ||
<nb_visits_converted>17</nb_visits_converted> | ||
<bounce_count>0</bounce_count> | ||
<sum_visit_length>27557</sum_visit_length> | ||
<max_actions>5</max_actions> | ||
<bounce_rate>0%</bounce_rate> | ||
<nb_actions_per_visit>4.5</nb_actions_per_visit> | ||
<avg_time_on_site>1621</avg_time_on_site> | ||
</result> |
4 changes: 4 additions & 0 deletions
4
...it/System/expected/test_AutoSuggestAPITest_eventUrl__API.getSuggestedValuesForSegment.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<result> | ||
<row>http://piwik.net/space/quest/iv</row> | ||
</result> |
12 changes: 12 additions & 0 deletions
12
tests/PHPUnit/System/expected/test_AutoSuggestAPITest_eventUrl__VisitsSummary.get_range.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<result> | ||
<nb_visits>17</nb_visits> | ||
<nb_actions>77</nb_actions> | ||
<nb_visits_converted>17</nb_visits_converted> | ||
<bounce_count>0</bounce_count> | ||
<sum_visit_length>27557</sum_visit_length> | ||
<max_actions>5</max_actions> | ||
<bounce_rate>0%</bounce_rate> | ||
<nb_actions_per_visit>4.5</nb_actions_per_visit> | ||
<avg_time_on_site>1621</avg_time_on_site> | ||
</result> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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