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.