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 Bounce Rate" operation fetches the ratio of visitors who landed on a specific page group and left the site without visiting any other page, relative to all visitors who landed on that page group.

This node is beneficial for digital analysts and marketers aiming to understand user engagement and identify pages with high bounce rates, which may indicate issues with content relevance or user experience. For example, it can be used to monitor landing pages' effectiveness or to compare bounce rates across different device types.

Properties

Name Meaning
Page Group ID The identifier of the page group for which the bounce rate metric is requested.
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 the analysis range (must be after start date).
- Format Format of the query date range (string, usage depends on API).
- Frequency Filter based on export frequency (string).
- From Filter based on export format (string).
- Goal ID Numeric ID to return conversion metrics for a non-ecommerce goal.
- IDs Comma-separated list of segment IDs to filter results.
- Limit Maximum number of results to return (minimum 1, default 50).
- Metric Type Metric calculation method: Quantile or Average.
- Order Sort order of results: Ascending or Descending.
- Page Page number of results to retrieve (for pagination).
- Period Granularity of results: Daily or None (only for date ranges larger than one day).
- Project ID Target project ID (required only for account-level API keys).
- Quantile Percentile value used if metric type is Quantile (default 75).
- Scope Filter based on scope (string).
- Segment IDs Numeric segment IDs separated by commas to get intersection metrics.
- Start Date Start date of the analysis range (must be before end date).
- State Filter based on status (string).
- To Alias for end date of the query date range (string).

Output

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

  • Bounce rate values over the specified period.
  • Breakdown by device or other filters if applied.
  • Pagination metadata 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 from Contentsquare.
  • Network access to https://api.contentsquare.com is required.
  • Proper configuration of 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 the API key credential is correctly configured.
  • Missing Page Group ID: This property is mandatory for the "Get Page Bounce Rate" operation. If omitted, the node throws an error.
  • 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 wrapped and reported with messages like "Error calling Contentsquare API". Check the API documentation for error codes and meanings.
  • Invalid Query Parameters: Providing invalid dates or unsupported parameter values may cause API errors. Validate inputs before execution.

Links and References

Discussion