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
GROUP BY idaction_url
ORDER BY nb_hits DESC
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?