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 Hover Time operation, it fetches the average total time users spend hovering over a specific zone element on a webpage.

This is useful in scenarios where you want to analyze user engagement with particular page elements (zones), such as buttons, banners, or interactive areas, by measuring how long users hover their cursor over them. For example, marketers or UX designers can use this metric to understand which parts of a page attract attention and potentially optimize layout or content placement.

Properties

Name Meaning
Zone ID The unique identifier of the zone (page element) for which the hover time metric is requested.
Query Parameters A collection of optional filters and parameters to refine the query results:
- Device: Filter by device type (All, Desktop, Mobile, Tablet).
- End Date: End date of analysis range.
- Format, Frequency, From, To: Various filtering options.
- Goal ID: Specify a non-ecommerce goal for conversion metrics.
- IDs: Comma-separated list of segment IDs.
- Limit: Maximum number of results to return.
- Metric Type: Quantile or Average.
- Order: Ascending or Descending.
- Page: Pagination page number.
- Period: Granularity of results (Daily or None).
- Project ID: Target project identifier.
- Quantile: Percentile value if metric type is quantile.
- Scope, Segment IDs, Start Date, State: Additional filters.

Output

The output is a JSON array containing the response from the Contentsquare API for the requested metric. The structure depends on the API's response but generally includes:

  • Metrics data about the average total hover time over the specified zone.
  • Possibly metadata about the query such as date ranges, device types, or segmentation applied.

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

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential with Client ID, Client Secret, and optionally Project ID and Scope for authentication.
  • The node performs OAuth2 client credentials flow to obtain an access token before making API requests.
  • The base API endpoint URL is dynamically retrieved during authentication.
  • Requires network access to https://api.contentsquare.com.

Troubleshooting

  • Missing Client ID or Client Secret: The node will throw an error if these credentials are not provided. Ensure your API credentials are correctly configured.
  • Zone ID Required: For the Get Zone Hover Time operation, the Zone ID must be provided; otherwise, an error is thrown.
  • Failed to Retrieve Access Token or Endpoint: If authentication fails, check that the credentials are valid and have the necessary permissions.
  • API Request Errors: Any HTTP or API errors are caught and reported with the message prefixed by "Error calling Contentsquare API". Check the error details for troubleshooting.
  • Empty or Unexpected Response: If the API returns empty or malformed data, verify the query parameters and ensure the zone exists and has data for the requested period.

Links and References

  • Contentsquare API Documentation (general reference for API endpoints and metrics)
  • OAuth2 Client Credentials Flow (standard OAuth2 authentication method used)

This summary focuses on the "Metrics API" resource and the "Get Zone Hover Time" operation as requested.

Discussion