Contentsquare icon

Contentsquare

Use the Contentsquare API

Actions76

Overview

This node integrates with the Contentsquare Metrics API to retrieve detailed metrics related to user behavior on web pages, specifically focusing on zones within a zoning. The "List Zones" operation fetches all zones associated with a specified zoning ID. This is useful for analyzing user interactions and engagement at a granular level within defined page areas.

Common scenarios include:

  • Retrieving all interactive zones on a webpage section to analyze click or hover behavior.
  • Preparing data for further metrics queries about specific zones.
  • Integrating zone data into dashboards or reports for UX optimization.

Example: You have a zoning defined for a product page and want to list all zones (e.g., buttons, banners) to later query their click rates or conversion metrics.

Properties

Name Meaning
Zoning ID Numeric identifier of the zoning for which to list all zones. This is required for the operation.
Query Parameters Optional filters and parameters to refine the request. Includes options like device type, date ranges, limit, order, metric type, etc. See below for details.

Query Parameters Options (subset relevant for filtering)

  • Device: Filter by device type (all, desktop, mobile, tablet).
  • End Date: End date for analysis range (string date).
  • Format: Format filter for export.
  • Frequency: Export frequency filter.
  • From: Filter based on export format.
  • Goal ID: Numeric goal identifier for conversion metrics.
  • IDs: Comma-separated segment IDs to filter results.
  • Limit: Maximum number of results to return (default 50).
  • Metric Type: Choose between Quantile or Average.
  • Order: Sort order, either Ascending or Descending.
  • Page: Page number of results to retrieve.
  • Period: Granularity of results (daily or none).
  • Project ID: Target project ID (required for account-level API keys).
  • Quantile: Percentile value used if metric type is quantile (default 75).
  • Scope: Scope filter string.
  • Segment IDs: Multiple segments separated by commas for intersection metrics.
  • Start Date: Start date for analysis range.
  • State: Status filter.
  • To: End date of query date range.

Output

The output is a JSON array where each item represents a zone object retrieved from the Contentsquare API for the specified zoning. The exact structure depends on the API response but typically includes zone identifiers, names, and metadata describing each zone.

If the API returns no content, the node outputs a status message indicating "204 No Content".

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential with Client ID, Client Secret, and optionally Project ID and scope configured in n8n credentials.
  • The node authenticates via OAuth2 client credentials flow against the Contentsquare API endpoint.
  • Network access to https://api.contentsquare.com is required.

Troubleshooting

  • Missing Zoning ID: The node throws an error if the required Zoning ID property is not provided.
  • Authentication Errors: If Client ID or Client Secret are missing or invalid, authentication will fail with an error "Missing Client ID or Client Secret" or "Failed to retrieve access token".
  • API Endpoint Issues: Failure to retrieve the API endpoint URL results in an error.
  • Invalid Query Parameters: Providing invalid or incorrectly formatted query parameters may cause API errors.
  • Empty Response: A "204 No Content" status indicates no zones found for the given zoning ID; verify the zoning ID is correct.
  • Network or Permission Issues: General API call failures will throw errors with messages from the underlying HTTP request.

Links and References

Discussion