Contentsquare icon

Contentsquare

Use the Contentsquare API

Actions76

Overview

The node integrates with the Contentsquare API, specifically enabling interaction with the Speed Analysis API to retrieve monitoring reports. This operation fetches performance monitoring data related to web page speed analysis, which helps detect slowdowns, identify optimization opportunities, and benchmark website performance.

Common scenarios for this node include:

  • Monitoring website speed metrics over time to ensure optimal user experience.
  • Retrieving detailed reports on monitored web pages to analyze performance trends.
  • Automating performance data collection for dashboards or alerts.

For example, a user can configure this node to get the latest monitoring reports filtered by device type (desktop, mobile, tablet) and date range, helping them track how their site performs across different platforms.

Properties

Name Meaning
Query Parameters A collection of optional filters and parameters to customize the monitoring reports request. These include: Device (All, Desktop, Mobile, Tablet), Start Date, End Date, Format, Frequency, Goal ID, IDs, Limit, Metric Type (Quantile, Average), Order (Ascending, Descending), Page, Period (Daily, None), Project ID, Quantile (percentile), Scope, Segment IDs, State, To (end date).
Request Body JSON object representing the request body payload sent with the API call. Typically used to specify additional filtering or configuration for the monitoring reports request. Defaults to an empty JSON object {}.

Output

The output is a JSON array where each item corresponds to a response from the Contentsquare Speed Analysis API's monitoring reports endpoint. The structure depends on the API response but generally includes detailed monitoring report data such as performance metrics, timestamps, device breakdowns, and other relevant analytics.

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.
  • Needs valid credentials configured in n8n for accessing the Contentsquare API.
  • The node makes HTTP requests to the Contentsquare API endpoints, so internet access and proper API permissions are necessary.

Troubleshooting

  • Missing Credentials: If the Client ID or Client Secret is missing, the node will throw an error "Missing Client ID or Client Secret." Ensure these are correctly set in the credentials.
  • Failed Token Retrieval: Errors like "Failed to retrieve access token" or "Failed to retrieve endpoint" indicate issues with authentication or API configuration. Verify credentials and API access rights.
  • Required Parameter Missing: Some operations require mandatory parameters (e.g., Job ID, Page Group ID, Zone ID). Omitting these will cause errors specifying which parameter is required.
  • API Errors: Any API call failure will be reported with the message "Error calling Contentsquare API" followed by the specific error message. Check network connectivity, API limits, and parameter correctness.
  • Invalid JSON in Request Body: If the request body JSON is malformed, the node may fail. Validate JSON syntax before execution.

Links and References

Discussion