Segmentation on API.action module


#1

Hi!
I’ve been “goggling” this issue for 2 days now, can’t find any information about this:
It seems that segmentation=pageUrl on the API.action.getPageUrls fails for archived reports, gives me no data.
It does work perfectly for the dates until it hits 180 days age (which is when the visitor logs are deleted).

Removing segmentation gives me data for the same period, so the info is there.

I don’t know if this is a bug or if segmentation is not possible on archived reports, some info on this would be awesome, thanks!

?module=API&method=Actions.getPageUrls&segment=pageUrl=@4fe868b6926c9&date=2013-11-01,2013-12-01&period=range&format=PHP&token_auth=


(Matthieu Aubry) #2

segmentation is not possible on archived reports.
Segmentation needs the “Visitor log” to work.


#3

Ok I see, thank you for the info Matt!
I’m guessing the only way to get specific page stats from archives would be to filter the data after fetching it from Piwik.
It makes sense that archived data is less flexible :stuck_out_tongue:


#4

Hello Matt,

can U please explain this a little bit more in detail.
Maybe I’am missing some basic part of it …

I have a problem with API calls like this:
index.php?module=API&method=Actions.getPageUrls&format=XML&idSite=1&period=month&date=last1&token_auth=[secret]&segment=pageUrl=@somestring

Piwik server returns XML file with no data in it:
<results> <result date="2015-11"/> </results>

If I make the API call without the segment (index.php?module=API&method=Actions.getPageUrls&format=XML&idSite=1&period=month&date=last1&token_auth=[secret]), I get the results and in those results I can also find particular segment:
<segment>pageUrl==http%3A%2F%2my.site.com%2Fsomestring</segment>

As far as I know, I have Visitors log enabled (I can see it in UI) …
I also have a cron job which runs every hour to automatically archive the reports and browser triggers for archiving are disabled as advised on Piwik Docs.
What am I doing wrong?