Contentsquare icon

Contentsquare

Use the Contentsquare API

Actions76

Overview

This node integrates with the Contentsquare API to retrieve detailed user behavior and performance metrics related to website zones, pages, and site-wide data. Specifically, the "Get Zone Conversion Rate per Hover" operation fetches the percentage of visitors who achieved a specified goal after hovering over a particular zone on a webpage.

This node is beneficial for digital analysts and marketers who want to understand how user interactions with specific page elements (zones) correlate with conversion goals. For example, it can help identify which interactive areas on a page are most effective at driving conversions based on hover behavior.

Practical examples:

  • Measuring how many users hovered over a promotional banner and then completed a purchase.
  • Analyzing hover engagement on call-to-action buttons to optimize their placement or design.
  • Comparing conversion rates per hover across different device types (desktop, mobile, tablet).

Properties

Name Meaning
Zone ID The unique identifier of the zone (page element) for which the conversion rate per hover metric is requested. This is required to specify the target zone.
Query Parameters A collection of optional filters and settings to refine the query results:
- Device: Filter by device type (all, desktop, mobile, tablet).
- End Date: End date of analysis range.
- Format: Format of the query.
- Frequency: Export frequency filter.
- From: Export format filter.
- Goal ID: Specify a non-ecommerce goal for conversion metrics.
- IDs: Comma-separated list of segment IDs to filter.
- Limit: Maximum number of results to return (default 50).
- Metric Type: Choose between Quantile or Average metric calculation.
- Order: Sort order of results (Ascending or Descending).
- Page: Page number of results.
- Period: Granularity of results (daily or none).
- Project ID: Target project ID (required for account-level API keys).
- Quantile: Percentile used if metric type is quantile (default 75).
- Scope, Segment IDs, Start Date, State, To: Additional filtering options for scope, segments, date range, and status.

Output

The output is a JSON array where each item contains the response data from the Contentsquare API for the requested zone conversion rate per hover metric. The structure depends on the API's response but typically includes:

  • Conversion rate values representing the percentage of visitors who converted after hovering on the specified zone.
  • Metadata about the query such as date ranges, device filters, and segmentation details if applied.

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

The node does not output binary data.

Dependencies

  • Requires an API key credential with client ID, client secret, and optionally project ID and scope for authentication against the Contentsquare API.
  • The node performs OAuth2 client credentials flow to obtain an access token before making API requests.
  • Network access to https://api.contentsquare.com is necessary.

Troubleshooting

  • Missing Client ID or Client Secret: The node will throw an error if these credentials are not provided. Ensure that valid API credentials are configured in n8n.
  • Zone ID is required: For this operation, the Zone ID must be specified; otherwise, an error is thrown.
  • Failed to retrieve access token or endpoint: Indicates issues with authentication or API configuration. Verify credentials and network connectivity.
  • API errors: If the API returns an error, the node surfaces the message prefixed with "Error calling Contentsquare API". Check the API documentation and ensure parameters are valid.
  • Empty or malformed responses: The node attempts to parse string responses as JSON; if parsing fails, raw text is returned. Confirm that the API is returning expected data formats.

Links and References

Discussion