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 user behavior and performance metrics. Specifically, the "List Segments" operation under the "Metrics API" resource fetches a list of all segments for a project, optionally filtered by various query parameters.
Use cases include:
- Analyzing user segments to understand different visitor groups.
- Filtering segments based on device type, date ranges, or other criteria.
- Retrieving segment data to feed into dashboards or further analytics workflows.
For example, you might use this node to get all mobile user segments created in the last month or to limit results to a specific set of segment IDs.
Properties
Name | Meaning |
---|---|
Device | Device filter for analysis. Options: All, Desktop, Mobile, Tablet |
End Date | End of date range for analysis (must be after Start Date) |
Format | Start date of the query date range |
Frequency | Filter based on export frequency |
From | Filter based on export format |
Goal ID | Return conversion metrics for a non-ecommerce goal |
IDs | Filter results to segments matching these IDs (comma-separated) |
Limit | Maximum number of results to return (minimum 1, default 50) |
Metric Type | Metric calculation type. Options: Quantile, Average |
Order | Order of results list. Options: Ascending, Descending (default Descending) |
Page | Page number of results to retrieve |
Period | Granularity of results (only for date ranges > 1 day). Options: Daily, None |
Project ID | Target project ID (required only for account-level API key) |
Quantile | Percentile used if metric type is quantile (default 75) |
Scope | Filter based on scope |
Segment IDs | Multiple segments separated by commas to get intersection metrics |
Start Date | Beginning of date range for analysis (must be before End Date) |
State | Filter based on status |
To | End date of the query date range |
Output
The output is a JSON array where each item represents a segment object returned by the Contentsquare Metrics API. The exact structure depends on the API response but typically includes segment identifiers, names, and associated metadata.
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.
- Needs valid credentials configured in n8n for the Contentsquare API.
- Network access to
https://api.contentsquare.com
is required.
Troubleshooting
- Missing Credentials: If Client ID or Client Secret are not provided, the node throws an error indicating missing credentials.
- Required Parameters Missing: Some operations require mandatory parameters like Page Group ID or Zone ID; absence will cause errors.
- Access Token Retrieval Failure: If the OAuth token cannot be retrieved, the node will throw an error.
- Invalid Query Parameters: Providing invalid or incorrectly formatted query parameters may result in API errors.
- API Endpoint Errors: The node surfaces API errors with messages prefixed by "Error calling Contentsquare API". Check the stack trace for details.
To resolve issues:
- Ensure all required credentials and parameters are correctly set.
- Verify network connectivity and API endpoint availability.
- Confirm that query parameters conform to expected formats and constraints.