Events on specific URL in a custom report

Hello, I want to see the number of events on a specific URL.
I tried to create a custom report with “event/event action/page url” but it doesn’t work (I only have the number of events).

Do you have any idea to fix it please ?

Thank you

Hi @A_Maldera
Can you share (screenshot) of the configuration you used to create the custom report?
Did you also wait for the data to be archived before looking at the report?

Hi @A_Maldera ,

Unfortunately it’s not possible yet to create a custom report with the “Events” metric. The best alternative you can use for now is the “Hits” metric. Hits will count all the actions that match.

If your custom report has no filter applied, then “Hits” will count all actions. But if your custom report has a filter defined, and the filter will filter for events only (and exclude other types of actions) then “Hits” will count the Event actions only. In this case “Hits” is close to the “Events” metric.

thank you for your help. Here’s the screenshot :

Hi @A_Maldera ,

Your issue is caused by the fact you’re looking to combine Page URL with Events data. These dimensions don’t get captured in the same request which is why combining them is not possible in Matomo’s Custom Reports.

Here’s a workaround:

Solution 1
You can use Event URL (the URL where the Event took place) to replace “Page URL” in your Custom report. It will work with a decent level of accuracy. Alternatively, if you want to be VERY accurate and make sure the Event data & URL are captured correctly each time, you can track the Page URL as your Event Name (it can be either one of Event Category, Event Action, Event Name, but I prefer the latter because this part of the event is rarely used in a meaningful way for analytics purposes).

Solution 2
The best way, from my perspective, to combine Event data with Page-level data, such as Page URL is to make use of the Custom Dimensions available in Custom Reports.

  1. First, you will need to set up the Custom Dimensions and consider using either a Visit, or an Action scope. This choice is important because if your CD is created as Visit, only the last value in that session will be recorded, whereas using Action, you will be able to capture all the values. There is merit in using either Visit or Action depending on the data you are looking to track.
  2. When the event is generated, track the Custom Dimension similar to the example provided in this article: (the section on Custom Dimensions includes an example of a tracking code you can adapt to your own needs).

Good luck, I hope the above helps!