You can get this metric in Google Analytics by selecting “Page Depth” as a dimension. This metric tells how many pages would a user typically browse before completing an action.
We need this metric for our Piwik API-based dashboard. Is there a way to request that data straight from API?
If not, how would we go about obtaining it in the most efficient fashion?
Piwik does not offer this dimension yet. could you create a feature request on our tracker: Issues · matomo-org/piwik · GitHub
and post there why you would like this feature, and how GA does it?