Skip to content
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

Action URL segment could filter both (Page URLs OR Event URLs) #11131

Closed
mgonera opened this issue Jan 2, 2017 · 6 comments · Fixed by #12236
Closed

Action URL segment could filter both (Page URLs OR Event URLs) #11131

mgonera opened this issue Jan 2, 2017 · 6 comments · Fixed by #12236
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@mgonera
Copy link

mgonera commented Jan 2, 2017

After recording an event, it also has idaction_url field (log_link_visit_action) filled with ID of URL it took place on. This URL is saved with idaction.type=10

Unfortunately, when later segmenting using "Action URL", events report won't be segmented, despite proper data residing in the database.

Confirmed on 2.16.2 and 3.0. Also confirmed proper behaviour on 2.15. I will be grateful for information if this should be treated as a bug, or maybe this behaviour can be explained.

@mgonera
Copy link
Author

mgonera commented Jan 3, 2017

Results of investigation done on my side:

If such an entry will have idaction.type changed to 1 (page url) then segmentation by Page URL will properly segment Events report.

This change was made on Nov 30, 2015: ea9ac05#diff-49022a94ed8c0e968b315e2d98fd1ef7L64

Earlier, the the returned value type was hardcoded in function 'getUrlAndType' as "self::TYPE_PAGE_URL" = 1

After the change, there is used a function 'getActionType' which returns hardcoded "Action::TYPE_EVENT" = 10
https://github.com/piwik/piwik/blob/2.16.5/plugins/Events/Actions/ActionEvent.php#L25

To sum up: Maybe it is intended behaviour, but just wasn't implemented fully properly? Maybe this association is proper, but for some reason, segmentation cannot pick up Action URL by "Action::TYPE_EVENT" = 10 ?

ping @mattab as I think this may be pretty important (is for me as well 😄 )

@mattab
Copy link
Member

mattab commented Jan 3, 2017

Thanks for the information! I think this could be categorised as a bug. @tsteur do you have any thought?

@tsteur
Copy link
Member

tsteur commented Jan 3, 2017

type 10 is correct. I would say the problem is the same as #8854 which eventually needs to be solved generally but like easily 4-5 days of work

@mattab
Copy link
Member

mattab commented Jan 3, 2017

without digging deep or looking in the code, I'm thinking as @mgonera suggests that Action URL segment could filter both (Page URLs OR Event URLs). Is this correct? if so, I would leave this issue opened and welcome a pull request from PP for this 👍

@mgonera
Copy link
Author

mgonera commented Jan 3, 2017

Yes exactly, I see this as expected behavior, Event is an Action, so if it has an URL, should be segmented by Action URL. 👍

@mattab mattab changed the title Segmenting events by Action URL is not successful Action URL segment could filter both (Page URLs OR Event URLs) Feb 20, 2017
@mattab mattab added this to the Backlog (Help wanted) milestone Feb 20, 2017
@mattab mattab added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Feb 20, 2017
mattab added a commit that referenced this issue Oct 31, 2017
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)
sgiehl pushed a commit that referenced this issue Nov 21, 2017
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)
sgiehl pushed a commit that referenced this issue Nov 21, 2017
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)
sgiehl pushed a commit that referenced this issue Nov 29, 2017
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)
mattab added a commit that referenced this issue Dec 1, 2017
)

* New "Event URL" segment `eventUrl` to segment on any Segment URL

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)

* fix typo no capital letter

* remove column type to prevent new column being created in the log_link_visit_action table

* set correct action type for segment eventUrl

* modify test

* eventUrl needs action data

* fix suggested values for eventUrl

* update test files

* event url is stored without protocol

* update test file
@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/difference-between-action-url-and-page-url/40622/21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants