{"action":"created","issue":{"url":"https://api.github.com/repos/piwik/piwik/issues/10127","repository_url":"https://api.github.com/repos/piwik/piwik","labels_url":"https://api.github.com/repos/piwik/piwik/issues/10127/labels{/name}","comments_url":"https://api.github.com/repos/piwik/piwik/issues/10127/comments","events_url":"https://api.github.com/repos/piwik/piwik/issues/10127/events","html_url":"https://github.com/piwik/piwik/issues/10127","id":153440282,"number":10127,"title":"Actions/Pages: Unique pageviews shouldn't be summed up in hierarchical view ","user":{"login":"adaqus","id":12760563,"avatar_url":"https://avatars.githubusercontent.com/u/12760563?v=3","gravatar_id":"","url":"https://api.github.com/users/adaqus","html_url":"https://github.com/adaqus","followers_url":"https://api.github.com/users/adaqus/followers","following_url":"https://api.github.com/users/adaqus/following{/other_user}","gists_url":"https://api.github.com/users/adaqus/gists{/gist_id}","starred_url":"https://api.github.com/users/adaqus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adaqus/subscriptions","organizations_url":"https://api.github.com/users/adaqus/orgs","repos_url":"https://api.github.com/users/adaqus/repos","events_url":"https://api.github.com/users/adaqus/events{/privacy}","received_events_url":"https://api.github.com/users/adaqus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/piwik/piwik/labels/Bug","name":"Bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-06T12:25:16Z","updated_at":"2016-06-01T14:19:04Z","closed_at":null,"body":"This is a db query used when creating Actions/Pages report:\r\n\r\n```\r\nSELECT\r\n            /* Actions */\r\n            log_action.name,\r\n            log_action.type,\r\n            log_action.idaction,\r\n            log_action.url_prefix,\r\n            count(DISTINCT log_link_visit_action.idvisit)   AS `2`,\r\n            count(DISTINCT log_link_visit_action.idvisitor) AS `1`,\r\n            count(*)                                        AS `12`,\r\n            sum(\r\n                CASE WHEN custom_float IS NULL\r\n                  THEN 0\r\n                ELSE custom_float\r\n                END\r\n            ) / 1000                                        AS `30`,\r\n            sum(\r\n                CASE WHEN custom_float IS NULL\r\n                  THEN 0\r\n                ELSE 1\r\n                END\r\n            )                                               AS `31`,\r\n            min(custom_float) / 1000                        AS `32`,\r\n            max(custom_float) / 1000                        AS `33`,\r\n            CASE WHEN (MAX(log_link_visit_action.custom_var_v5) = 0\r\n                       AND log_link_visit_action.custom_var_k5 = '_pk_scount')\r\n              THEN 1\r\n            ELSE 0 END\r\n                                                            AS `28`,\r\n            SUM(CASE WHEN log_action_name_ref.type = 8\r\n              THEN 1\r\n                ELSE 0 END)\r\n                                                            AS `29`\r\n          FROM\r\n            piwik_log_link_visit_action AS log_link_visit_action\r\n            LEFT JOIN piwik_log_action AS log_action\r\n              ON log_link_visit_action.idaction_url = log_action.idaction\r\n            LEFT JOIN piwik_log_action AS log_action_name_ref\r\n              ON log_link_visit_action.idaction_name_ref =\r\n                 log_action_name_ref.idaction\r\n          WHERE\r\n            log_link_visit_action.server_time >= ?\r\n            AND log_link_visit_action.server_time <= ?\r\n            AND log_link_visit_action.idsite = ?\r\n            AND log_link_visit_action.idaction_url IS NOT NULL AND\r\n            log_link_visit_action.idaction_event_category IS NULL\r\n          GROUP BY\r\n            log_action.idaction\r\n          ORDER BY\r\n            `12` DESC, name ASC\r\n```\r\n\r\nIn this query for each action type (group by log_action.idaction) number of unique visits is counted (count(DISTINCT log_link_visit_action.idvisit)   AS `2`). So when we have a visit with pageviews on /category1/sub1 and /category1/sub2, for each pagieview we have one unique visit (unique pageview). Category1 also has 1 unique visit, but it will be shown it has 2.\r\n\r\n![actions-pages](https://cloud.githubusercontent.com/assets/12760563/15072757/5a6ff514-1395-11e6-8108-7e0161141843.png)\r\n\r\nValues underlined (and each expandable element) are sums of unique pageviews from subelements, so some visits are counted more than once.\r\n\r\nThis will probably also apply to other reports from Actions group.\r\n"},"comment":{"url":"https://api.github.com/repos/piwik/piwik/issues/comments/223006893","html_url":"https://github.com/piwik/piwik/issues/10127#issuecomment-223006893","issue_url":"https://api.github.com/repos/piwik/piwik/issues/10127","id":223006893,"user":{"login":"tomasztomik","id":16131839,"avatar_url":"https://avatars.githubusercontent.com/u/16131839?v=3","gravatar_id":"","url":"https://api.github.com/users/tomasztomik","html_url":"https://github.com/tomasztomik","followers_url":"https://api.github.com/users/tomasztomik/followers","following_url":"https://api.github.com/users/tomasztomik/following{/other_user}","gists_url":"https://api.github.com/users/tomasztomik/gists{/gist_id}","starred_url":"https://api.github.com/users/tomasztomik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomasztomik/subscriptions","organizations_url":"https://api.github.com/users/tomasztomik/orgs","repos_url":"https://api.github.com/users/tomasztomik/repos","events_url":"https://api.github.com/users/tomasztomik/events{/privacy}","received_events_url":"https://api.github.com/users/tomasztomik/received_events","type":"User","site_admin":false},"created_at":"2016-06-01T14:19:04Z","updated_at":"2016-06-01T14:19:04Z","body":"@mattab We are ready to work on this topic and prepare PR, but first we have to know what actually we are going to do. Change they way how it's being calculated ? Do not display any value in that column for expandable nodes, or column label?"}}
{"actor":{"display_login":"tomasztomik"}}