How do I calculate in Database to query for nb_hits connected to event_action

Hi Team,
Wanted to know how to get sum of nb_hits in the database for event_action type =11 but we do not want only visits, we want a number of hits for event_action.

SELECT idaction_url, COUNT(*) AS nb_hits, idsite, server_time
FROM matomo_log_link_visit_action
GROUP BY idaction_url

Used this query to join Matomo_segment and join Matomo_log_action but getting different results from the result. Wayy off by over 1000. And in the matomo_segment table I observed that definition of the segment does not seem to have my filter created in UI which is isinternal=nottrue to exclude internal users.

Can you suggest a way forward?


Hey any one can help me out on this?

Following as I am also looking for answer.

1 Like