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 web pages. Specifically, the "Get Page Interaction Time" operation fetches the average time users spend interacting with a particular page group. This metric helps understand user engagement on specific pages by measuring how long visitors actively interact with the content.

Common scenarios where this node is beneficial include:

  • Analyzing user engagement on landing pages to optimize content layout.
  • Comparing interaction times across different device types (desktop, mobile, tablet).
  • Monitoring changes in interaction time after website updates or A/B tests.
  • Integrating interaction time data into broader analytics workflows for reporting or alerting.

Example: You want to measure how long users interact with your homepage on mobile devices during the last month to evaluate the effectiveness of recent UI changes.

Properties

Name Meaning
Page Group ID The unique identifier of the page group for which the interaction time metric is requested. This is required to specify the target page group.
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 the analysis range.
- Format: Format of the query.
- Frequency: Export frequency filter.
- From: Export format filter.
- Goal ID: Conversion goal identifier.
- IDs: Comma-separated segment IDs to filter.
- Limit: Maximum number of results to return (default 50).
- Metric Type: Choose between Quantile (percentile) or Average.
- Order: Sort order, either Ascending or Descending.
- Page: Pagination page number.
- 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 (default 75).
- Scope, Segment IDs, Start Date, State, To: Additional filtering parameters.

Output

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

  • Metric values representing average or quantile interaction times.
  • Associated metadata such as timestamps, device types, segments, or other filters applied.
  • Pagination information if multiple pages of results are returned.

No binary data is output by this node.

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.
  • Network access to the Contentsquare API endpoint (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.
  • Failed to retrieve access token or endpoint: Indicates issues with authentication or API availability. Verify credentials and network connectivity.
  • Page Group ID is required: For this operation, the Page Group ID must be specified; otherwise, an error is thrown.
  • API errors: Any HTTP or API errors are wrapped and reported with messages indicating the failure reason. Check the API documentation for error codes and meanings.
  • Empty or malformed responses: If the API returns unexpected data, ensure query parameters are correct and the API service is operational.

Links and References

Discussion