API for single URL graphs

(Adriano Foschi) #1

Hello, I am new to Matomo, I would use it to generate report for single page url in my website.

For each page I needs all geoip graph, linechart, tables etc.

I watched demo and APIs but I didn’t find a way to do it with APIs or from panel demo (for a single page I can see only line charts in demo).

Is there a way to do it?

(Lukas Winkler) #2

You can use the segment feature to filter everything by a query.

If you want a single URL, then you should add a segment for Action URL is https://example.com/

add a new segment for "Action URL is THEURL"

These segements (which can also be preprocessed can also be created via the SegmentEditor API:

In addition you can segment every API query on the fly by adding an &segment= parameter:

First answered here: php - Matomo: report for single url - Stack Overflow

(Adriano Foschi) #3

It’s exactly what I was searching for.
Does it work with widgetize module too?

Thanks you