Datenbankschema time_spent vs Time spent on page

Ich wollte eine so erstellte Abfrage verwenden, um die Informationen zu den Feldern „time_spent“ (Tabelle „matomo_log_link_visit_action“) abzurufen:

"
SELECT matomo_log_action.idaction AS idaction,
matomo_log_action.name AS URL,
matomo_log_action.url_prefix AS url_prefix,

LEFT(CONVERT(matomo_log_link_visit_action.server_time, CHAR), 10) AS “Day”,

matomo_log_link_visit_action.time_spent AS “Time on Page”,

matomo_log_visit.idvisit AS “Visit ID”,

matomo_log_visit.idsite AS “Live Site ID”

FROM matomo_log_visit
LEFT JOIN matomo_log_link_visit_action
ON matomo_log_link_visit_action.idvisit = matomo_log_visit.idvisit
LEFT JOIN matomo_log_action
ON matomo_log_link_visit_action.idaction_url = matomo_log_action.idaction
WHERE matomo_log_link_visit_action.idsite = <Parameters.Matomo Live> AND

matomo_log_visit.idsite = <Parameters.Matomo Live>"

Das Ergebnis im Feld „time_spent“ ist jedoch immer „Null“ – dort scheinen keine aufgezeichneten Informationen vorhanden zu sein. Dies widerspricht der Art und Weise, wie Informationen in unserer Matomo-Instanz dargestellt werden, wo ich Informationen zur „time spent on page“ sehen kann.

Wenn jemand einen Hinweis geben könnte, wo diese Informationen im Datenbankschema versteckt sind und warum das Feld time_spent in der matomo_log_link_visit_action Tabelle keine Informationen zurückgibt, wäre ich sehr dankbar.

Ich glaube visit_total_time aus matomo_log_visit ist die gesuchte Größe.

Mit hat ein Blick auf das Matomo Datenbank Schema sehr geholfen. (https://developer.matomo.org/guides/database-schema).

1 Like