Get outlinks from specific page through API?


#1

Hi!

I have tried to figure out how to retrieve outlinks from a specific page by using the API.
I know that the information is stored in Piwik and can be access on the normal Piwik interface (see attached screenshot).

I have tried looking at Actions.getOutlinks with a segment but that just returns and empty result. I have also tried to use Transitions.getTransitionsForPageUrl but that simply returns a “NoDataForAction” message.

I hope someone out there knows something about this and can help me in the right direction :slight_smile:

Regards,
Mathias


(Matthieu Aubry) #2

Transitions.getTransitionsForPageUrl should work indeed, as it is the API used to build this report. have you set &pageUrl= to the URL encoded URL ?


#3

Yes and I can not get it to work on the Piwik demo site either:

http://demo.piwik.org/index.php?module=API&method=Transitions.getTransitionsForPageUrl&period=day&date=yesterday&idSite=7
&pageUrl=http%3A%2F%2Fforum.piwik.org%2Findex&format=JSON&token_auth=anonymous

still says NoDataForAction and I can not see what I am missing or doing wrong ? :slight_smile:


#4

Email me about replies to this topic


#5

Hi,

the following request works on the demo:


http://demo.piwik.org/index.php?module=API&method=Transitions.getTransitionsForPageUrl&period=day&date=yesterday&idSite=7&pageUrl=http%3A%2F%2Fforum.piwik.org%2Findex.php&format=JSON&token_auth=anonymous

I simply added “.php” to the url.


#6

Wow thanks, after all I got it to work. Something stupid like that can mess it up :stuck_out_tongue:


#7

Hi,

As follow-up on this topic.
Is it possible to get outlinks from PageURLs who contain a certain value?
Like ‘ienm’? Instead of a whole URL?

Thanks in advance.

Kind regards,
Julia