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 metrics about user behavior and site performance. Specifically, the "Get Site Visits" operation under the "Metrics API" resource fetches the number of sessions (site visits) within a specified date range and other optional filters.
Use cases include:
- Analyzing traffic trends over time for a website.
- Filtering visits by device type or segments to understand audience composition.
- Monitoring site engagement and performance metrics for marketing or UX optimization.
For example, you could use this node to get the total number of visits to your site in the last month filtered by mobile devices, helping you tailor mobile experiences.
Properties
Name | Meaning |
---|---|
Device | Filter visits by device type: All, Desktop, Mobile, Tablet |
End Date | End of the date range for analysis (must be after Start Date) |
Format | Format filter for the query (specific usage depends on API) |
Frequency | Filter based on export frequency |
From | Filter based on export format |
Goal ID | 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 type: Quantile or Average |
Order | Sort order of results: Ascending or Descending |
Page | Page number of results to retrieve |
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 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 (similar to End Date) |
Output
The output JSON contains the response from the Contentsquare Metrics API endpoint for site visits. This typically includes data such as:
- Number of sessions (visits) matching the query parameters.
- Possibly additional metadata like pagination info depending on the request.
If the API returns binary data (not typical for this operation), it would represent raw data exports or reports, but for "Get Site Visits," the output is standard JSON metrics data.
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 with these details.
- Network access to
https://api.contentsquare.com
is required. - Proper project ID and any necessary permissions/scopes must be set in the API credentials.
Troubleshooting
- Missing Client ID or Client Secret: The node will throw an error if these are not provided in credentials.
- Failed to retrieve access token or endpoint: Indicates issues with authentication; verify credentials and network connectivity.
- Required parameter missing errors: For example, "Page Group ID is required" or "Zone ID is required" if those are needed for other operations. For "Get Site Visits," ensure required parameters like date range are correctly set.
- API errors: The node surfaces API error messages; check the message and stack trace for details.
- Empty or unexpected responses: Verify that query parameters are correct and that the API has data for the requested filters.