Quantcast
Channel: Support & Bugs - Matomo forums
Viewing all articles
Browse latest Browse all 5706

Piwik API: "label" for Actions.getPageTitles & .getPageUrls get truncated

$
0
0

@sw1 wrote:

Hi there,

I'm trying to generate a report via the API for site with the following rough example structure:

http://my-domain.com -- "My page title"
|── /sub-dir-1/sub-dir-2/custom-dir-1/index.html -- "Title 1: first part / second part"
|── /sub-dir-1/sub-dir-2/custom-dir-2/index.html -- "Title 2: first part / second part"

I want to access some general stats per page such as nb_uniq_visitors, bounce_rate, avg_time_on_site, etc. by sending the following API requests:

1: Actions.getPageTitles
piwik.my-domain.com/?module=API&method=Actions.getPageTitles&idSite=&period=week&date=last1&segment=pageUrl=@%2Fsub-dir-3%2F&format=JSON&token_auth=

Problem: "label" gets truncated after the "/" in the page title (i.e. it says "Title 1: first part " when it should say "Title 1: first part / second part"). However, I do need the second part of the page title to uniquely identify the page. The response also contains no other identifier.

I have tried to get url information by including e.g. "&showColumns=nb_visits,nb_hits,url" but no URL is included in the response.

2: Actions.getPageUrls
piwik.my-domain.com/?module=API&method=Actions.getPageUrls&idSite=&period=week&date=last1&segment=pageUrl=@%2Fsub-dir-3%2F&format=JSON&token_auth=

Problem: Report is automatically grouped under label "sub-dir-1", i.e. there is again no information for unique pages.

I believe the behavior in case 1 might be a bug, at least it does not come to me how that would be intended.

In any case, can someone point me to a solution how I can get the response I need, i.e. basic metrics + at least one unique identifier?

Thank you!

PS: We are running Piwik version 2.16.2

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5706

Trending Articles