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, sites, and exports. Specifically, for the Metrics API resource and the Get Zone Hesitation Time operation, it fetches the average time elapsed between the last hover over a zone and the first selection (click or tap) of that zone.

This metric is useful in understanding user hesitation or decision-making time before interacting with a specific area (zone) on a webpage or app screen. It can help UX designers and analysts identify zones where users hesitate longer, potentially indicating confusion or interest.

Practical examples:

  • Measuring hesitation time on call-to-action buttons to optimize their design.
  • Analyzing hesitation on product images or promotional banners to improve engagement.
  • Comparing hesitation times across devices (desktop, mobile, tablet) to tailor experiences.

Properties

Name Meaning
Zone ID The unique identifier of the zone for which the hesitation time metric is requested. This is required to specify the target zone.
Query Parameters A collection of optional filters and parameters to refine the query results:
- Device: Filter by device type (All, Desktop, Mobile, Tablet).
- Start Date / End Date: Define date range for analysis.
- Format, Frequency, From, To: Additional filtering options.
- Goal ID: Specify a non-ecommerce goal for conversion metrics.
- IDs, Segment IDs: Filter by segment identifiers.
- Limit: Maximum number of results to return.
- Metric Type: Choose between Quantile (default 75th percentile) or Average.
- Order: Sort results ascending or descending.
- Page: Pagination control.
- Period: Granularity of results (daily or none).
- Project ID: Target project identifier (required for account-level API keys).
- Quantile: Percentile value used if metric type is quantile.
- Scope, State: Additional filters based on scope or status.

Output

The output is a JSON array containing the response from the Contentsquare Metrics API for the zone hesitation time metric. The structure depends on the API response but typically includes:

  • Metric values representing the average or quantile hesitation time for the specified zone.
  • Metadata about the query such as timestamps, device types, segments, or pagination info if applicable.

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 active Contentsquare API credential with:
    • Client ID
    • Client Secret
    • Optional Project ID and Scope
  • The node performs OAuth2 client credentials flow to obtain an access token.
  • The API endpoint URL is dynamically retrieved from the authentication response.
  • Network access to https://api.contentsquare.com is necessary.

Troubleshooting

  • Missing Credentials: If Client ID or Client Secret are missing, the node throws an error "Missing Client ID or Client Secret."
  • Access Token Retrieval Failure: If the OAuth token cannot be obtained, errors like "Failed to retrieve access token" or "Failed to retrieve endpoint" occur.
  • Required Parameter Missing: For this operation, if the Zone ID is not provided, the node throws "Zone ID is required".
  • API Errors: Any HTTP or API errors are wrapped and reported with the message prefix "Error calling Contentsquare API:" followed by the original error message.
  • Invalid Query Parameters: Ensure date ranges are valid (startDate before endDate), numeric fields are numbers, and enumerated options are correctly set.
  • Empty Responses: A "204 No Content" status indicates no data was returned for the query; verify filters and parameters.

Links and References

Discussion