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 - Create Event operation, it allows users to create a new event related to web page speed analysis. This can be useful for tracking performance issues, benchmarking page load times, or monitoring user experience metrics by sending custom events to the Contentsquare platform.

Typical use cases include:

  • Automatically creating speed analysis events when certain conditions are met in a workflow.
  • Logging performance-related incidents or milestones during website monitoring.
  • Integrating speed event creation into broader automation pipelines for performance optimization.

Properties

Name Meaning
Query Parameters A collection of optional parameters to filter or customize the request. Includes options such as Device (All, Desktop, Mobile, Tablet), date ranges (Start Date, End Date), format, frequency, limit, order, and more.
Request Body JSON object representing the body of the event creation request. This is where you specify the details of the event to be created according to the API's requirements.

Details on Query Parameters (selected examples):

  • Device: Filter analysis by device type (All, Desktop, Mobile, Tablet).
  • Start Date / End Date: Define the date range for the analysis.
  • Limit: Maximum number of results to return (default 50).
  • Metric Type: Choose between "Quantile" or "Average" metrics.
  • Order: Sort results ascending or descending.
  • Other parameters allow filtering by project ID, segment IDs, scope, state, etc.

Output

The output is the JSON response returned by the Contentsquare API after creating the event. It typically contains the details of the newly created event, such as its ID, timestamp, status, and any other metadata provided by the API.

If the API returns no content, the node outputs a status code message indicating "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.
  • The node expects valid credentials configured in n8n that provide access to the Contentsquare API.
  • Network access to https://api.contentsquare.com is required.
  • The node uses standard HTTP methods (POST for event creation) with JSON payloads.

Troubleshooting

  • Missing Client ID or Client Secret: The node will throw an error if these credentials are not set or invalid. Ensure your API credentials are correctly configured.
  • Failed to retrieve access token or endpoint: Indicates issues with authentication or API availability. Verify credentials and network connectivity.
  • Required parameters missing: Some operations require specific IDs or parameters (e.g., Job ID, Page Group ID). The node validates these and throws errors if missing.
  • API errors: If the API returns an error, the node surfaces the message with context. Check the API documentation for error codes and meanings.
  • Invalid JSON in Request Body: Ensure the JSON input for the request body is well-formed.

Links and References


This summary focuses on the "Speed Analysis API" resource and the "Create Event" operation as requested, describing the node's behavior, inputs, outputs, dependencies, and common troubleshooting points based on static code analysis.

Discussion