Actions76
- Data Export API Actions
- Metrics API Actions
- Get Page Activity Rate
- Get Page Bounce Rate
- Get Page Conversion Rate
- Get Page Exit Rate
- Get Page Fold Height
- Get Page Height
- Get Page Interaction Time
- Get Page Landing Rate
- Get Page Scroll Rate
- Get Page Time Spent
- Get Page Unique Visits
- Get Page Views
- Get Page Views per Visit
- Get Page Visits
- Get Page Web Vitals
- Get Site Bounce Rate
- Get Site Cart Average
- Get Site Conversion Rate
- Get Site Conversions
- Get Site Pageview Average
- Get Site Revenue
- Get Site Session Time Average
- Get Site Visits
- Get Zone Attractiveness Rate
- Get Zone Click Rate
- Get Zone Click Recurrence
- Get Zone Conversion Rate per Click
- Get Zone Conversion Rate per Hover
- Get Zone Conversion Rate per Tap
- Get Zone Engagement Rate
- Get Zone Exposure Rate
- Get Zone Exposure Time
- Get Zone Hesitation Time
- Get Zone Hover Rate
- Get Zone Hover Time
- Get Zone Number of Clicks
- Get Zone Revenue
- Get Zone Revenue per Click
- Get Zone Revenue per Tap
- Get Zone Swipe Rate
- Get Zone Swipe Rate Recurrence
- Get Zone Tap Rate
- Get Zone Tap Recurrence
- Get Zone Time Before First Click
- Get Zone Time Before First Tap
- List Goals
- List Mappings
- List Page Groups
- List Page Groups Metrics
- List Segments
- List Site Metrics
- List Zone Metrics
- List Zones
- List Zonings
- Speed Analysis API Actions
Overview
This node integrates with the Contentsquare API to retrieve detailed site metrics data. Specifically, the "List Site Metrics" operation fetches various aggregated metrics about a website's user behavior and performance over a specified date range. This is useful for digital analysts, marketers, and product managers who want to monitor key performance indicators such as bounce rate, conversion rate, revenue, visits, and session times.
Typical use cases include:
- Monitoring overall site health and user engagement trends.
- Analyzing conversion rates and revenue performance.
- Comparing metrics across different devices or segments.
- Automating reporting workflows by fetching metrics programmatically.
For example, you could use this node to get the site's bounce rate and conversion rate between two dates filtered by device type, then trigger alerts or update dashboards based on the results.
Properties
Name | Meaning |
---|---|
Device | Filter metrics by device type. Options: All, Desktop, Mobile, Tablet. |
End Date | End of the date range for analysis (must be after Start Date). Format: string representing a date. |
Format | Format filter for the query (usage context not explicitly defined in code). |
Frequency | Filter based on export frequency (usage context not explicitly defined in code). |
From | Filter based on export format (usage context not explicitly defined in code). |
Goal ID | Numeric ID to return conversion metrics for a non-ecommerce goal. |
IDs | Comma-separated list of segment IDs to filter results matching these segments. |
Limit | Maximum number of results to return. Default is 50. Minimum value is 1. |
Metric Type | Type of metric aggregation. Options: Quantile (default), Average. Quantile defaults to 75th percentile unless overridden. |
Order | Order of results list. Options: Ascending, Descending (default). |
Page | Page number of results to retrieve (for pagination). |
Period | Granularity of results. Options: Daily, None (default). Can only be used if date range is larger than one day. |
Project ID | Target project ID (required only for account-level API keys). |
Quantile | Percentile value used when Metric Type is Quantile. Defaults to 75. Ignored if Metric Type is Average. |
Scope | Filter based on scope (usage context not explicitly defined in code). |
Segment IDs | Numeric ID(s) specifying multiple segments separated by commas to retrieve metrics for their intersection. |
Start Date | Beginning of date range for analysis (must be before End Date). Format: string representing a date. |
State | Filter based on status (usage context not explicitly defined in code). |
To | End date of the query date range (seems redundant with End Date; usage context unclear). |
Output
The node outputs an array of JSON objects representing the response from the Contentsquare Metrics API for site metrics. The structure depends on the specific metrics requested but generally includes fields such as:
- Metric names and values (e.g., bounce rate, conversion rate, revenue).
- Time series data if granularity ("period") is set to daily.
- Pagination metadata if applicable.
If the API returns no content, the output will indicate a "204 No Content" status.
No binary data output is produced by this operation.
Dependencies
- Requires an API authentication token obtained via OAuth2 client credentials flow using a Client ID and Client Secret.
- The node expects valid credentials configured in n8n containing at least:
- Client ID
- Client Secret
- Optional Project ID and Scope
- Network access to
https://api.contentsquare.com
is required.
Troubleshooting
- Missing Credentials: If Client ID or Client Secret are missing, the node throws an error indicating these are required.
- Required Parameters Missing: For this operation, no explicit required parameters are enforced by the code, but providing a valid date range (
startDate
andendDate
) is necessary for meaningful results. - API Token Retrieval Failure: If the OAuth token cannot be retrieved, the node throws an error indicating failure to obtain the access token or endpoint.
- Invalid Parameter Values: Passing invalid or empty required IDs (like Project ID for account-level keys) may cause API errors.
- Empty or Malformed Response: The node attempts to parse JSON responses; if parsing fails, it returns raw text or a 204 status message.
- Network Issues: Connectivity problems to the API endpoint will result in request errors.
To resolve common issues:
- Ensure all required credentials and parameters are correctly set.
- Verify date ranges are valid and formatted properly.
- Check network connectivity and API availability.
- Review error messages for specific missing parameters.
Links and References
- Contentsquare API Documentation
- OAuth 2.0 Client Credentials Flow
- Contentsquare Metrics API Reference (general reference, actual URL may vary)