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
Manually track custom/virtual pageviews #7548
Comments
Hi @joseariel, did you enable the option "Keep Page URL fragments when tracking Page URLs" in the site settings? |
Hi @RMastop, you are everywhere! : ) I don't have access to the site setting. I will ask the admin to see if this is an option, although this hasn't been the case in the past. Could I work around this by using a -, / or . instead of the # ? Thanks! |
You would get strange looking URLs, but a / would work. |
I'm running a few tests now. Can you confirm that this is the correct way to track the pageview manually?: _paq.push(['trackPageView', currentURL()]); |
I ran the test and it did count the new visits using the following call but it still doesn't break it down by pages on the reports. I believe that I'm not using the correct params for the trackPageView call. Call (in Browser): _paq.push(['trackPageView', "https://domain.com/vl/VehicleLoan.aspx.vehicle-information?lenderref=LPQUniversity_test"]); API call (Report): /?module=API&method=Actions.getPageUrls&idSite=98&period=day&date=2015-03-26&format=JSON&token_auth=...&expanded=1 Returns: label: "/VehicleLoan.aspx?lenderref=LPQUniversity_test", The count went up from 32 to 66 but it only returns a single page with all pageviews aggregated. Do you have any suggestions on how to get a breakdown of the different pages tracked? |
In the first example you used _paq.push(['trackPageView', "https://domain.com/vl/VehicleLoan.aspx.vehicle-information?lenderref=LPQUniversity_test#pagetitlevalue"]); In the second example you use _paq.push(['trackPageView', "https://domain.com/vl/VehicleLoan.aspx.vehicle-information?lenderref=LPQUniversity_test"]); You omit the titlevalue in the last call. Is that a mistake or was it on purpose? My solution would be That is what I understood in your initial question. |
I believe that the omission that you are referring to was simply a typo. I like your suggested solution, I'm testing it now to see if the report reflects that pages broken down as you suggest. I'll be back with an update. Thanks @RMastop |
Hi @RMastop, I think the issue I'm hitting doesn't have to do with the tracking client. I think it has to do with the Reporting API. I went to check the reports through the UI Dashboard and found that everything I had done was properly recorded under the 'Page Titles' section, even when I was using the # tag for the URL identifier. But the issue is that what I really need to do is not customize the page title but rather the actual Page URL. Do you know how to switch from tracking the page title to tracking a custom page url using _paq.push(['trackPageView'])? I've attached screenshots. |
Hi @joseariel to set the Page URL use the method |
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.
Our 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:
Reporting URL:
/?module=API&method=Actions.getPageUrls&idSite=98&period=day&date=2015-03-26&format=JSON&token_auth=...&expanded=1
Returns:
Any insights into how to correct this issue are greatly appreciated.
The text was updated successfully, but these errors were encountered: