Matomo icon

Matomo

Use the Matomo API

Actions539

Overview

This node integrates with the Matomo API to perform various operations across multiple resources, including the Segment Editor. Specifically, for the Segment Editor resource with the Add Segment operation, it allows users to add a new segment by sending a request to the Matomo API with the specified segment definition and parameters. This is useful for users who want to programmatically manage and create custom segments in Matomo for advanced analytics and reporting.

Use Case Examples

  1. Adding a new segment to Matomo with a specific segment definition to filter analytics data.
  2. Automating segment creation as part of a data pipeline or workflow.

Properties

Name Meaning
Query Parameters A collection of optional parameters to customize the API request for adding a segment, such as segment definition, name, description, and other segment-related settings.
Request Body A JSON object representing the body of the request, containing the segment details to be added.

Output

JSON

  • json - The JSON response from the Matomo API after adding the segment, typically containing details of the newly created segment or confirmation of the operation.

Dependencies

  • Matomo API credentials including domain and authentication token

Troubleshooting

  • Ensure that the Matomo API credentials (domain and auth token) are correctly configured; missing credentials will cause the node to throw an error.
  • Verify that the segment definition and parameters in the request body are valid according to Matomo's API requirements to avoid API errors.
  • Check network connectivity and Matomo server availability if HTTP requests fail.
  • If the API response is empty or unexpected, verify the API endpoint and parameters used in the request.

Discussion