Troubles creating an imagegraph per page


(Wortho) #1

Any comments are much appreciated, I am trying to create an imagegraph at a page level. It works for a site level using getPageUrls but cant get it to work for getPageUrl

This works for getPageUrls…

http://[servername]/index.php?module=API&method=ImageGraph.get&idSite=2&period=day&date=previous60&apiModule=Actions&apiAction=getPageUrls&format=xml&graphType=evolution&token_auth=anonymous

but using Actions.getPageUrl and pageUrl to create an imagegraph at a page level like this doesnt work…

http://[servername]/index.php?module=API&method=ImageGraph.get&idSite=2&period=day&date=previous30&apiModule=Actions&apiAction=getPageUrl&pageUrl=http://example.com/test.aspx&graphType=evolution&token_auth=anonymous

I can confirm the data is being returned ok by using this (below) and looks like it should work? Ive tried ranges and other various other things but no luck.

http://[servername]/index.php?module=API&method=Actions.getPageUrl&pageUrl=http://example.com/test.aspx&idSite=2&period=day&date=previous10&format=xml&token_auth=anonymous

The response I get is…

Invalid API Module and/or API Action

Thanks in advance


(Matthieu Aubry) #2

Indeed it is a “missing feature”.

Because Action.getPageUrl is not part of the Metadata API the ImageGraph don’t work. We could add it I suppose, but it’s not high priority… Cheers


(Wortho) #3

OK thanks Matt, it thought it might have been something I was doing/not doing.

Good to know not all the API’s are supported with ImageGraph, I wasnt sure about that.

Regards


#4

Hi,

is there an alternative to generate a graph of visits evolution for a specific page, as you do in the detailed popup?

Cheers,

Pv


(Matthieu Aubry) #5

Yes you can generate a graph for a particular page, see Metadata: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3