alex
(Alex)
1
I am trying to get the number of pageviews and visits for each given url via API, and I assume Actions.getPageUrl is the right method I should use.
The API works well with plain url (i.e. http://example.com/) but it doesn’t work if the url has parameters in it (i.e. Example Domain).
<?php
.....
$url .= "?module=API&method=Actions.getPageUrl";
$url .= "&idSite=1&period=month&date=&pageUrl=".urlencode("http://example.com/?n=12983" ) ;
....
?>
Any idea?
thanks,
Alex
matthieu
(Matthieu Aubry)
2
I just tested and indeed there is an error (“undefined function printdebug …”) which I fixed in:http://dev.piwik.org/trac/changeset/4359
Then it appears to work: http://demo.piwik.org/index.php?module=API&method=Actions.getPageUrl&idSite=7&period=day&date=yesterday&format=xml&token_auth=anonymous&pageUrl=http%3A%2F%2Fforum.piwik.org%2Fread.php%3F2%2C74492
Did you see the error “undefined function printdebug” or did it simply return nothing?
Please try with the latest RC + this changeset
alex
(Alex)
3
Hi Matt,
Checked out latest code and it working fine now.
thanks,
Alex