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 Number of Clicks" operation fetches the total number of clicks on a specified zone for pageviews where that zone was selected at least once.

This node is beneficial in scenarios where you want to analyze user interaction intensity on specific areas (zones) of a webpage or app screen. For example, marketers or UX analysts can use it to measure how often users click on a particular button or link area, helping optimize layout and content placement.

Practical examples:

  • Measuring the total clicks on a promotional banner zone to evaluate its effectiveness.
  • Tracking clicks on navigation menu zones to understand user navigation patterns.
  • Comparing click counts across different device types or time periods using query parameters.

Properties

Name Meaning
Zone ID The unique identifier of the zone for which the number of clicks metric is requested. This is required to specify the target zone.
Query Parameters A collection of optional filters and settings to refine the data retrieval:
- Device: Filter by device type (All, Desktop, Mobile, Tablet).
- End Date: End date of analysis range.
- Format: Start date of query range.
- Frequency, From, To, Scope, State: Various filtering options.
- Goal ID: For conversion metrics related to a non-ecommerce goal.
- IDs, Segment IDs: Filter results by segment or 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 (required for account-level API keys).
- Quantile: Percentile value used if metric type is quantile (default 75).

Output

The output JSON contains the response from the Contentsquare API endpoint for the zone number of clicks metric. It typically includes numerical data representing the total clicks on the specified zone, possibly broken down by the applied query parameters such as date ranges or device types.

If the API returns multiple records (e.g., paginated or segmented data), the output will be an array of objects each containing relevant metric details.

The node does not output binary data.

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 necessary.
  • No additional external dependencies beyond the n8n environment and the configured API credentials.

Troubleshooting

  • Missing Client ID or Client Secret: The node throws an error if these credentials are not provided. Ensure your API credentials are correctly set up in n8n.
  • Zone ID is required: If the Zone ID property is empty when calling this operation, the node will throw an error indicating the missing parameter.
  • Failed to retrieve access token or endpoint: Indicates issues with authentication or API configuration; 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 for error codes and meanings.
  • Invalid query parameters: Providing invalid or logically inconsistent query parameters (e.g., endDate before startDate) may cause API errors.

Links and References

Discussion