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, for the Metrics API resource and the Get Zone Tap Recurrence operation, it fetches the average number of times an element (zone) was tapped during a screen view on an app.

This node is beneficial in scenarios where you want to analyze user engagement on specific interactive areas ("zones") of your mobile app or website. For example, marketers or UX analysts can use this metric to understand how frequently users tap on certain UI elements, helping optimize design and improve conversion rates.

Practical examples:

  • Measuring tap recurrence on promotional banners within a mobile app.
  • Analyzing user interaction frequency on call-to-action buttons.
  • Comparing tap engagement across different device types or time periods.

Properties

Name Meaning
Zone ID The unique identifier of the zone (UI element) for which the tap recurrence metric is requested.
Query Parameters A collection of optional filters and parameters to refine the query:
- Device: Filter by device type (All, Desktop, Mobile, Tablet).
- End Date: End date of analysis range.
- Format: Export format filter.
- Frequency: Export frequency filter.
- From: Export format filter.
- Goal ID: Conversion goal ID for non-ecommerce goals.
- IDs: Comma-separated list of segment IDs to filter.
- Limit: Maximum number of results to return.
- Metric Type: Quantile or Average.
- Order: Ascending or Descending order.
- 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 value used if metric type is Quantile.
- Scope: Scope filter.
- Segment IDs: Multiple segments separated by commas.
- Start Date: Start date of analysis range.
- State: Status filter.
- To: End date of query date range.

Output

The output JSON contains the response from the Contentsquare Metrics API endpoint for zone tap recurrence. This typically includes statistical data about the average number of taps per engaged session or screenview on the specified zone.

The exact structure depends on the API response but generally includes fields such as:

  • The zone identifier.
  • The calculated average or quantile tap recurrence metric.
  • Metadata about the query period, device type, or segmentation applied.

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

No binary data output is involved in this operation.

Dependencies

  • Requires valid credentials with 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 required.
  • Proper configuration of the API credentials in n8n is necessary.

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 this operation, the node throws an error indicating the requirement.
  • Failed to Retrieve Access Token or Endpoint: Errors occur if the OAuth token request fails or the endpoint URL is missing. Verify credentials and network connectivity.
  • API Request Errors: Any HTTP or API errors are caught and reported with the message "Error calling Contentsquare API" along with the original error message and stack trace.
  • Invalid Query Parameters: Providing invalid or conflicting query parameters may result in API errors; verify parameter values and formats.
  • Empty or Unexpected Response: If the API returns an empty string or unexpected format, the node attempts to parse it; otherwise, it returns a 204 status indication.

Links and References

Discussion