Contentsquare icon

Contentsquare

Use the Contentsquare API

Actions76

Overview

This node integrates with the Contentsquare API, specifically supporting multiple resources including the Speed Analysis API. For the Speed Analysis API - List Events operation, it retrieves a list of speed analysis events related to web page performance monitoring. This is useful for users who want to monitor and analyze website speed issues, detect slowdowns, and benchmark performance over time.

Typical use cases include:

  • Fetching recent speed analysis events to track performance regressions.
  • Aggregating event data for reporting or alerting workflows.
  • Integrating speed event data into dashboards or other analytics tools.

Properties

Name Meaning
Query Parameters A collection of optional filters and parameters to refine the list of events returned by the API. The available options are:
- Device: Filter by device type (All, Desktop, Mobile, Tablet)
- End Date: End of date range for analysis (must be after startDate)
- Format: Start date of the query date range (string)
- Frequency: Filter based on export frequency (string)
- From: Filter based on export format (string)
- Goal ID: Return conversion metrics for a non-ecommerce goal (number)
- IDs: Comma-separated list of segment IDs to filter results (string)
- Limit: Maximum number of results to return (number, default 50)
- Metric Type: Quantile or Average
- Order: Ascending or Descending
- Page: Page number of results to retrieve (number)
- Period: Granularity of results (Daily or None)
- Project ID: Target project ID (required only for account-level API key)
- Quantile: Percentile value if metric type is quantile (default 75)
- Scope: Filter based on scope (string)
- Segment IDs: Multiple segments separated by commas (number)
- Start Date: Beginning of date range for analysis (must be before endDate)
- State: Filter based on status (string)
- To: End date of query date range (string)
Request Body JSON object for request body payload (optional, defaults to empty object {}). Used for POST requests.

Output

The node outputs an array of JSON objects representing the list of speed analysis events retrieved from the API. Each item corresponds to an event with its associated details as provided by the Contentsquare Speed Analysis API.

If the API returns no content, the node outputs a JSON object indicating "Status Code": "204 No Content".

The node does not output binary data.

Dependencies

  • Requires an API authentication token obtained via OAuth2 client credentials flow using a Client ID and Client Secret.
  • Needs valid credentials configured in n8n for accessing the Contentsquare API.
  • Makes HTTP requests to the Contentsquare API endpoint, which is dynamically retrieved during authentication.

Troubleshooting

  • Missing Client ID or Client Secret: The node will throw an error if these credentials are not provided.
  • Failed to retrieve access token or endpoint: Indicates issues with authentication; verify credentials and API access permissions.
  • Required parameter missing errors: For example, if required IDs like Job ID, Page Group ID, or Zone ID are missing for certain operations, the node throws descriptive errors.
  • API call failures: Errors from the API are wrapped and presented with messages starting with "Error calling Contentsquare API". Check the API response and network connectivity.
  • Invalid query parameters: Ensure date ranges are valid (startDate before endDate), numeric fields are numbers, and enumerated options are correctly selected.

Links and References

Discussion