{"action":"created","issue":{"url":"https://api.github.com/repos/piwik/piwik/issues/7548","labels_url":"https://api.github.com/repos/piwik/piwik/issues/7548/labels{/name}","comments_url":"https://api.github.com/repos/piwik/piwik/issues/7548/comments","events_url":"https://api.github.com/repos/piwik/piwik/issues/7548/events","html_url":"https://github.com/piwik/piwik/issues/7548","id":64610028,"number":7548,"title":"Manually track custom/virtual pageviews","user":{"login":"joseariel","id":3110415,"avatar_url":"https://avatars.githubusercontent.com/u/3110415?v=3","gravatar_id":"","url":"https://api.github.com/users/joseariel","html_url":"https://github.com/joseariel","followers_url":"https://api.github.com/users/joseariel/followers","following_url":"https://api.github.com/users/joseariel/following{/other_user}","gists_url":"https://api.github.com/users/joseariel/gists{/gist_id}","starred_url":"https://api.github.com/users/joseariel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joseariel/subscriptions","organizations_url":"https://api.github.com/users/joseariel/orgs","repos_url":"https://api.github.com/users/joseariel/repos","events_url":"https://api.github.com/users/joseariel/events{/privacy}","received_events_url":"https://api.github.com/users/joseariel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-26T19:09:35Z","updated_at":"2015-03-26T21:51:07Z","closed_at":null,"body":"We're attempting to setup a custom implementation of the piwik tracking client (code) to allow us to track page transitions on a single-page jquery mobile app.\r\n\r\nOur code looks like this so far and works but when pulling the reports throw the url below, we only get an aggregated count for the main (initial) url and not a breakdown of the different virtual pages:\r\n\r\n```js\r\n<!-- Piwik -->\r\n\tvar currentURL = function() {\r\n\t\tvar title = jQuery(\".ui-page-active .ui-title\"),\r\n\t\t\tcurrentStage = null,\r\n\t\t\ttrackedURL = null;\r\n\t\r\n\t\tif (title && title[0].innerText.length > 0) { currentStage = title[0].innerText; }\r\n\r\n\t\tif (currentStage != null && typeof(currentStage) != 'undefined') {\r\n\t\t\ttrackedURL = window.location.protocol + \"//\" + window.location.host + window.location.pathname + \"#\" + currentStage.toLowerCase().replace(' ', '-') + \"?\" + window.location.search.substring(1);\r\n\t\t} else {\r\n\t\t\ttrackedURL = window.location.href;\r\n\t\t}\r\n\t\r\n\t\treturn trackedURL;\r\n\t};\r\nvar _paq = _paq || [];\r\n  _paq.push(['setDocumentTitle', currentURL()]);\r\n  _paq.push(['trackPageView']);\r\n  _paq.push(['enableLinkTracking']);\r\n  (function() {\r\n    var u=\"//analytics.loanspq.com/\";\r\n    _paq.push(['setTrackerUrl', u+'piwik.php']);\r\n    _paq.push(['setSiteId', 98]);\r\n    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];\r\n    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);\r\n\t\t\r\n\t\tjQuery(window).on(\"pageshow\", function(event) {\r\n\t\t\tconsole.log( currentURL(), event );\r\n\t\t\t_paq.push(['trackPageView', currentURL()]);\r\n\t\t});\r\n  })();\r\n<!-- End Piwik Code -->\r\n```\r\n\r\nReporting URL:\r\n\r\n/?module=API&method=Actions.getPageUrls&idSite=98&period=day&date=2015-03-26&format=JSON&token_auth=...&expanded=1\r\n\r\nReturns:\r\n\r\n```js\r\n[\r\n{\r\nlabel: \"vl\",\r\nnb_visits: 1,\r\nnb_hits: 32,\r\nsum_time_spent: 4010,\r\nnb_hits_with_time_generation: 32,\r\nmin_time_generation: \"0.245\",\r\nmax_time_generation: \"0.737\",\r\nentry_nb_visits: 1,\r\nentry_nb_actions: 32,\r\nentry_sum_visit_length: 2586,\r\nentry_bounce_count: 0,\r\nexit_nb_visits: 1,\r\navg_time_on_page: 4010,\r\nbounce_rate: \"0%\",\r\nexit_rate: \"100%\",\r\navg_time_generation: 0.599,\r\nidsubdatatable: 9,\r\nsubtable: [\r\n{\r\nlabel: \"/VehicleLoan.aspx?lenderref=LPQUniversity_test\",\r\nnb_visits: 1,\r\nnb_uniq_visitors: 1,\r\nnb_hits: 32,\r\nsum_time_spent: 4010,\r\nnb_hits_with_time_generation: \"32\",\r\nmin_time_generation: \"0.245\",\r\nmax_time_generation: \"0.737\",\r\nentry_nb_uniq_visitors: \"1\",\r\nentry_nb_visits: \"1\",\r\nentry_nb_actions: \"32\",\r\nentry_sum_visit_length: \"2586\",\r\nentry_bounce_count: \"0\",\r\nexit_nb_uniq_visitors: \"1\",\r\nexit_nb_visits: \"1\",\r\navg_time_on_page: 4010,\r\nbounce_rate: \"0%\",\r\nexit_rate: \"100%\",\r\navg_time_generation: 0.599,\r\nurl: \"https://domain.com/vl/VehicleLoan.aspx?lenderref=LPQUniversity_test\"\r\n}\r\n]\r\n}\r\n]\r\n```\r\n\r\nAny insights into how to correct this issue are greatly appreciated."},"comment":{"url":"https://api.github.com/repos/piwik/piwik/issues/comments/86731111","html_url":"https://github.com/piwik/piwik/issues/7548#issuecomment-86731111","issue_url":"https://api.github.com/repos/piwik/piwik/issues/7548","id":86731111,"user":{"login":"RMastop","id":7987117,"avatar_url":"https://avatars.githubusercontent.com/u/7987117?v=3","gravatar_id":"","url":"https://api.github.com/users/RMastop","html_url":"https://github.com/RMastop","followers_url":"https://api.github.com/users/RMastop/followers","following_url":"https://api.github.com/users/RMastop/following{/other_user}","gists_url":"https://api.github.com/users/RMastop/gists{/gist_id}","starred_url":"https://api.github.com/users/RMastop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RMastop/subscriptions","organizations_url":"https://api.github.com/users/RMastop/orgs","repos_url":"https://api.github.com/users/RMastop/repos","events_url":"https://api.github.com/users/RMastop/events{/privacy}","received_events_url":"https://api.github.com/users/RMastop/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T21:51:06Z","updated_at":"2015-03-26T21:51:06Z","body":"In the first example you used _paq.push(['trackPageView', \"https://domain.com/vl/VehicleLoan.aspx.vehicle-information?lenderref=LPQUniversity_test#pagetitlevalue\"]);\r\n\r\nIn the second example you use _paq.push(['trackPageView', \"https://domain.com/vl/VehicleLoan.aspx.vehicle-information?lenderref=LPQUniversity_test\"]);\r\n\r\nYou omit the titlevalue in the last call. Is that a mistake or was it on purpose?\r\n\r\nMy solution would be\r\n_paq.push(['trackPageView', \"https://domain.com/vl/VehicleLoan.aspx.vehicle-information?lenderref=LPQUniversity_test/titlevalue\"]);\r\nThat would create the extra page urls. For every unique combination of url / titlevalue a new page.\r\n\r\nThat is what I understood in your initial question."}}