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. The "Get Scenario Step Report" operation under the Speed Analysis API resource retrieves detailed reports for individual steps within a scenario. This is useful for analyzing the performance and behavior of specific user journey steps on a website or application.

Typical use cases include:

  • Monitoring the load time and performance metrics of each step in a user scenario.
  • Identifying bottlenecks or slowdowns at particular steps in a multi-step process (e.g., checkout flow).
  • Benchmarking scenario step performance against competitors or historical data.

For example, a digital analyst could use this node to fetch step-level reports of a checkout scenario to understand which step causes delays and optimize accordingly.

Properties

Name Meaning
Query Parameters A collection of optional filters and parameters to customize the report request. These include:
- Device: Filter by device type (All, Desktop, Mobile, Tablet)
- Date range: Start Date, End Date, To, From
- Format, Frequency, Period
- Goal ID: For conversion metrics
- IDs: Comma-separated list of segment IDs
- Limit: Max number of results (default 50)
- Metric Type: Quantile or Average
- Order: Ascending or Descending
- Page: Pagination page number
- Project ID: Target project identifier
- Quantile: Percentile value if metric type is quantile (default 75)
- Scope, State: Additional filtering options
- Segment IDs: Multiple segments separated by commas
Request Body JSON object to send as the request body. Used for POST requests to provide additional data or parameters required by the API endpoint. Defaults to an empty JSON object {}.

Output

The output is a JSON array where each element corresponds to the response from the API call for each input item.

  • The json field contains the parsed JSON response from the Contentsquare API for the scenario step report.
  • If the API returns a string response, the node attempts to parse it as JSON; otherwise, it outputs the raw text.
  • If no content is returned (HTTP 204), the output will indicate "Status Code": "204 No Content".
  • The node does not explicitly handle binary data for this operation.

The structure of the JSON depends on the API's scenario step report format, typically including metrics and details about each step in the scenario.

Dependencies

  • Requires an API authentication token obtained via OAuth2 client credentials flow using a Client ID and Client Secret.
  • Needs a valid Contentsquare API credential configured in n8n with the necessary permissions and scope.
  • The node makes HTTP requests to the Contentsquare API endpoints, so internet access and proper network configuration are required.

Troubleshooting

  • Missing Client ID or Client Secret: The node throws an error if these credentials are not provided or invalid. Ensure that the API credentials are correctly set up in n8n.
  • Failed to retrieve access token or endpoint: Indicates issues with authentication or API configuration. Verify credentials and API availability.
  • Required parameters missing: Some operations require mandatory parameters (e.g., Job ID, Page Group ID, Zone ID). The node validates these and throws errors if missing.
  • API errors: Any error returned by the Contentsquare API will be wrapped and reported with the message "Error calling Contentsquare API" along with the original error message and stack trace.
  • Invalid JSON in Request Body: If the JSON provided in the Request Body property is malformed, the node will fail. Validate JSON syntax before execution.

Links and References

Discussion