Empty results for Actions.getPageUrl + range queries

Hi,

I’m using getPageUrl requests to query for hits+visits for individual URLs, but most of the time, I get an empty result.

calling
https://analytics.mysite.com/index.php?module=API&method=Actions.getPageUrl&idSite=2&period=range&date=2013-02-11,today&format=JSON&token_auth=X&pageUrl=http://mysite.com/jobs/job/junior-php-entwickler-wm/
returns a valid result:


[
{
label: "/index",
nb_visits: 16,
nb_hits: 19,
sum_time_spent: 868,
exit_nb_visits: "1",
sum_daily_nb_uniq_visitors: 16,
sum_daily_exit_nb_uniq_visitors: "1",
avg_time_on_page: 54,
bounce_rate: "0%",
exit_rate: "6%",
url: "http://mysite.com/jobs/job/junior-php-entwickler-wm/"
}
]

but with a greater range, the response is empty:
https://analytics.mysite.com/index.php?module=API&method=Actions.getPageUrl&idSite=2&period=range&date=2013-02-01,today&format=JSON&token_auth=X&pageUrl=http://mysite.com/jobs/job/junior-php-entwickler-wm/
returns:


[ ]

Any suggestions?

If you are on Apache you could try increasing your time out. I had a similar issue where I could put the link in the browser and it would return the desired result but being called from the archive.php script it would time out. Increasing it helped to solve the issue for me, not sure if it is totally the same issue you have but worth sharing in case it helps or gets you an idea to help fix your issue.

I have since switched to NGINX for my piwik install and have not hit the same issues I would run into on Apache.

HTH

Can you reproduce this bug on the demo ?

Hi,

the demo-API shows correct results

http://demo.piwik.org/index.php?module=API&method=Actions.getPageUrl&idSite=7&period=range&date=2012-01-01,today&format=JSON&token_auth=anonymous&pageUrl=/read.php?2,77229

works for all date ranges I’ve tried.

Maybe it’s fixed already or I’m not sure. please wait for next release to try again

@matthieu
I too am facing the same issue -
We have imported data using GoogleImporter plugin.

I get data for this range as mentioned below: 16th Dec 2019 to 18th March 2021

https://analytics.sophiamedia.com/?module=API&method=Actions.getPageUrl&pageUrl=https://healthimpactnews.com/2019/study-water-fluoridation-linked-to-lower-iq-in-children/&idSite=4&period=range&date=2019-12-16,2021-03-18&format=JSON&token_auth=sometoken

However, I do not get response for the date range : 16th Dec 2019 to any date beyond 18th March 2021

https://analytics.sophiamedia.com/?module=API&method=Actions.getPageUrl&pageUrl=https://healthimpactnews.com/2019/study-water-fluoridation-linked-to-lower-iq-in-children/&idSite=4&period=range&date=2019-12-16,2021-03-28&format=JSON&token_auth=sometoken

It should have returned me the previous response atleast. Not making sense to me. I hope you can help me figure out the issue.

Also I observed a few of the URL’s are not imported at all. The import was successful but a few URL’s from that IMPORT date range were skipped by Google Importer plugin. Not sure why ? And it was never reported. Is there a way where the plugin LOGS Failed / Missed / Skipped Imported URL’s ?