How can I export a full list of absolute urls? Not separated by segments


#1

Hi,

I am using Actions.getPageUrls method from API to get all the urls visited today with their stathistics.

The result is in XML and is grouped by segments. I saw there is the parameter expanded to show what’s below the first segment. But I don’t need that, I just want a clean list of every unique urls with its data:

And so on.

Can someone point me in the right direction?

PS: I would also want to be able to filter the urls by text in the url.

Thanks,
Alex.


#2

You can use TSV/CSV and includeInnerNodes=0
This will remove the folders and give you just the pages.
Example: http://demo.piwik.org/?module=API&method=Actions.getPageUrls&format=TSV&idSite=7&period=day&date=today&expanded=1&idGoal=-1&filter_limit=-1&includeInnerNodes=0

By the way, if you want more readable labels, you can use also use &language=en&translateColumnNames=1


#3

Hi there!

At the moment I am parsing the XML with a php function to export to an array only the end urls, but what you propose looks great as it is cleaner and won’t need that much parsing, so it would provide better performance.

As for the translation, I don’t need it for now because I import data from piwik to a website’s database, it’s not for humans that need to read it, but it’s good to know it too.

Thank you for your answer!