Urlref Parameter

Can the urlref parameter be accessed via the API?

I would like to segment Users, by a page they have viewed (url) and also the page they came from (urlref). Transitions and Overlay are fine to show n/% routes from or to a page, but I am unable to see where this can become a segment, and use both url and urlref.

Is this possible, if anyone knows can they post an example?

This is possible in my other analytics tool, but I do love Piwiks and extendability and always looking to push the product further. Great work Matt and Innocraft.


Maybe I misunderstand your issue as I am not that familiar with segments, but it should be possible to create a segment depending on the referrer URL (where visitor came from).

Hi Lukas, thanks for the reply :slight_smile:

This segment doesn’t seem to be in use for the same domain, only external referrers to the site domain.

The urlref parameter does however record for every page view, so I am wondering if urlref data recorded on the same domain is dropped or kept in the _piwik tables and accessible via the API.

Any ideas…? :):grinning:


So you want to get a segment of all user who have visited /first_page/ and then directly went to /second_page/? I am not sure if this is possible in Piwik. Maybe this plugin helps you. Other than that I am clueless.

1 Like

Yes, that is exactly the use case. I would assume that urlref parameter values are used in the Transition and Overlay module. Not however as segments in the way I need for my analysis.

I don’t have enough data in my innocraft cloud site to prove out the UserFlow plugin and I can’t increase the sample either. Good shout though, maybe the UserFlow plugin could provide that insight, unless like Tranition/Overlay they can only take a starting url value and group low level path traffic into “Others”.

Thanks for the reply, really appreciate you taking the time :slight_smile: