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 Click Rate" operation fetches the percentage of pageviews where at least one click occurred on a specified zone. This metric helps understand user engagement with particular areas of a webpage.

Common scenarios for this node include:

  • Analyzing how often users interact with specific interactive elements or zones on a webpage.
  • Measuring the effectiveness of UI components by tracking click rates.
  • Comparing engagement across different devices or time periods using query parameters.

For example, a marketing analyst might use this node to get the click rate on a promotional banner zone to evaluate its performance during a campaign.

Properties

Name Meaning
Zone ID The unique identifier of the zone for which the click rate metric is requested. This is required to specify the target zone.
Query Parameters A collection of optional filters and settings to refine the metric request:
- Device: Filter results by device type (All, Desktop, Mobile, Tablet).
- Start Date / End Date: Define date range for analysis.
- Limit: Maximum number of results to return.
- Metric Type: Choose between Quantile or Average.
- Order: Sort results ascending or descending.
- Page: Pagination page number.
- Period: Granularity of results (Daily or None).
- Other filters like Goal ID, Segment IDs, Project ID, Scope, State, etc., to further customize the query.

Output

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

  • Metrics data about the click rate for the specified zone.
  • Possibly metadata such as timestamps, device breakdowns, or pagination info depending on query parameters.

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

The node does not output binary data.

Dependencies

  • Requires an API key credential with client ID, client secret, project ID, and scope configured in n8n credentials.
  • Makes HTTP requests to the Contentsquare OAuth token endpoint to obtain an access token.
  • Uses the obtained access token to authenticate subsequent API calls to the Contentsquare metrics endpoints.

Troubleshooting

  • Missing Client ID or Client Secret: The node will throw an error if these credentials are not provided. Ensure that the API key credential is properly set up.
  • Failed to retrieve access token or endpoint: Indicates issues with authentication or credential configuration. Verify credentials and network connectivity.
  • Required parameter missing errors: For example, "Zone ID is required" if the zoneId property is empty when calling zone-related metrics. Make sure all mandatory inputs are filled.
  • API call errors: If the API returns an error, the node throws a descriptive error including the message and stack trace. Check the API documentation for correct usage and parameter values.
  • Empty or unexpected responses: Could be due to incorrect filters or no data available for the given parameters. Adjust query parameters or verify data availability in Contentsquare.

Links and References

Discussion