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

New segment: ActionType #9314

Merged
merged 6 commits into from Dec 4, 2015
Merged

New segment: ActionType #9314

merged 6 commits into from Dec 4, 2015

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Dec 1, 2015

This PR defines a new segment ActionType. This is especially useful when for example viewing a CustomDimensions report in scope Action. By default custom dimensions are tracked across all actions. By using eg a segment actionType=pageviews one can see all custom dimensions tracked for pageviews. Or maybe someone wants to see all Custom Dimension values for downloads and outlinks etc.

In order to make this work we had to change how event urls are tracked as the segment works on the SQL segment log_action.type. So far, when an event was tracked, we looked for a URL having the type 1 (Pageview) in log_action. To be actually able to segment for events we are now using type 10 in log_action when request was an event. Downside is we create many more entries in log_action for each URL used in an event tracking call. On the good side we now have more accurate statistics in Transition reports where exit rate and referrer are calculated more correctly since they did not differentiate between events and a pageview.

We also identified at some point it might be useful to completely remove the type column from log_action table and instead store the type of the action in log_link_visit_action. This would help to avoid creating many duplicated entries in log_action.

Re failing tests:

  • There is a failing test in CustomDimensions plugin. We need to fix that test once we actually merged it. Otherwise we'd have to fix this test in a branch in CustomDimension and later change the submodule back to master in CustomDimensions once this PR is merged
  • Some UI tests fail because the order of Segments failed. This is expected for now and not a problem

@tsteur tsteur added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. labels Dec 1, 2015
@tsteur tsteur added this to the 2.15.1 milestone Dec 1, 2015
@tsteur tsteur added Needs Review PRs that need a code review and removed Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. labels Dec 1, 2015
@mattab
Copy link
Member

mattab commented Dec 3, 2015

Bug:

  • Viewing "Page URLs" report with segment "Action type IS download" results in error SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'log_action' - caused by plugin Actions - caused by plugin Actions - caused by plugin Actions - caused by plugin Actions

@mattab
Copy link
Member

mattab commented Dec 3, 2015

We also identified at some point it might be useful to completely remove the type column from log_action table and instead store the type of the action in log_link_visit_action. This would help to avoid creating many duplicated entries in log_action.

Created #9326: Delete log_action.type column and move it to: log_link_visit_action.type

@tsteur
Copy link
Member Author

tsteur commented Dec 4, 2015

Viewing "Page URLs" report with segment "Action type IS download" results in error SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'log_action' - caused by plugin Actions - caused by plugin Actions - caused by plugin Actions - caused by plugin Actions

Cannot reproduce this one

@tsteur
Copy link
Member Author

tsteur commented Dec 4, 2015

Actually can reproduce it now, not sure why it only happens on some reports

@tsteur
Copy link
Member Author

tsteur commented Dec 4, 2015

Should be fixed

mattab pushed a commit that referenced this pull request Dec 4, 2015
@mattab mattab merged commit 55038d2 into master Dec 4, 2015
@mattab mattab deleted the action_type_segment branch December 4, 2015 01:51
@mattab mattab added the Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. label Jan 30, 2016
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. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants