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 other entities. Specifically, the "Get Zone Tap Rate" operation fetches the percentage of users who tapped at least once on a specified zone within an app environment.

Use cases include analyzing user engagement on specific interactive areas (zones) of mobile apps or websites, optimizing UI elements based on tap interaction rates, and monitoring how users interact with different parts of a screen.

For example, a product manager might use this node to measure how often users tap on a promotional banner zone in a mobile app to evaluate its effectiveness.

Properties

Name Meaning
Zone ID The unique identifier of the zone for which the tap rate 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).
- End Date: End date of analysis range.
- Format: Format of the query date range.
- Frequency: Export frequency filter.
- From: Export format filter.
- Goal ID: For conversion metrics on non-ecommerce goals.
- IDs: Comma-separated segment IDs to filter.
- Limit: Max number of results (default 50).
- Metric Type: Choose between Quantile or Average.
- Order: Sort order 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.

Output

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

  • Metrics related to the tap rate on 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 message indicating "204 No Content".

No binary data output is involved in this operation.

Dependencies

  • Requires valid credentials with a Client ID, Client Secret, and optionally Project ID and Scope for 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.
  • Proper configuration of the API credentials in n8n is mandatory.

Troubleshooting

  • Missing Client ID or Client Secret: The node will throw an error if these credentials are not provided. Ensure that the API credentials are correctly set up.
  • Zone ID Required: If the Zone ID property is empty when calling the "Get Zone Tap Rate" operation, the node throws an error. Always provide a valid Zone ID.
  • Failed to Retrieve Access Token or Endpoint: Indicates issues with authentication or API availability. Verify credentials and network connectivity.
  • API Errors: Any HTTP or API errors are caught and reported with the message prefixed by "Error calling Contentsquare API". Check the API documentation and ensure request parameters are valid.
  • Empty or Unexpected Response: If the API returns an empty string or unexpected data, the node attempts to parse it; otherwise, it returns a "204 No Content" status.

Links and References

Discussion