Matomo icon

Matomo

Use the Matomo API

Actions539

Overview

This node integrates with the Matomo API to perform various analytics operations. Specifically, for the Media resource and the Get Current Sum Time Spent operation, it retrieves the total time spent on videos and audio media within a specified recent time window. This is useful for monitoring media engagement metrics in real-time or near real-time, such as understanding how much time users are spending on media content on a website.

Use Case Examples

  1. A marketing analyst wants to track how much time visitors spend watching videos on their site in the last 30 minutes to evaluate engagement.
  2. A content manager needs to monitor audio consumption duration to optimize podcast content based on user interaction data.

Properties

Name Meaning
Query Parameters Optional parameters to filter or specify the data to retrieve from the Matomo API, such as site ID, period, segment, or lastMinutes to define the recent time window for media analytics.

Output

JSON

  • 0 - The JSON response from the Matomo API containing the sum of time spent on media (videos/audio) in the specified recent time window.

Dependencies

  • Requires Matomo API credentials including domain URL and authentication token.

Troubleshooting

  • Ensure that the Matomo domain URL and authentication token are correctly configured in the node credentials; missing these will cause an error.
  • Verify that the query parameters are correctly formatted and valid for the Media.getCurrentSumTimeSpent API method to avoid API errors.
  • If the API response is empty or returns '204 No Content', check that the specified time window (e.g., lastMinutes) has relevant data available in Matomo.

Links

Discussion