Reputation: 3803
Trying to implement Piwik using REST API over http but need a little help.
What I'm trying to do is get the analytics for a particular page where a custom field = x.
I'm not sure if I'm going about it the right way but I have this so far:
My custom field is set up and viewable in the admin.
However the result just seems to return 0 for everything. I'm testing by inserting the url directly into a browser and also by fetching in php.
Also is there a method to get all statistics for a particular page and given date range where custom field = x? I can't seem to see one in the API docs.
Any help/ examples would be appreciated.
Upvotes: 0
Views: 1529
Reputation: 3803
In case anyone else happens to be looking for this I ended up using the getPageUrl method:
$url = "http://www.mysite.co.uk/piwik/index.php?module=API&method=Actions.getPageUrl&pageUrl=/foo.php?id=" . $id . "&idSite=1&period=month&date=today&format=php&filter_limit=1&token_auth=xxxx";
regards,
fl3x7
Upvotes: 2