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 web analytics and user behavior metrics. Specifically, the "Get Page Web Vitals" operation under the "Metrics API" resource fetches a list of web vitals metrics for a specified page group. These metrics include core web vitals that measure real-world user experience on web pages, such as loading performance, interactivity, and visual stability.
This node is beneficial for digital analysts, marketers, and developers who want to monitor and optimize website performance by accessing key user engagement and performance indicators programmatically. For example, it can be used to automate the retrieval of Core Web Vitals data for specific page groups to track improvements over time or to trigger alerts when performance degrades.
Properties
Name | Meaning |
---|---|
Page Group ID | The unique identifier of the page group for which to retrieve web vitals metrics. This is required to specify the target page group in the query. |
Query Parameters | A collection of optional filters and parameters to refine the data request: - Device: Filter results by device type (All, Desktop, Mobile, Tablet). - End Date: End date of the analysis range. - Format: Format of the query date range. - Frequency: Export frequency filter. - From: Export format filter. - Goal ID: Conversion goal identifier for non-ecommerce goals. - IDs: Comma-separated list of segment IDs to filter. - Limit: Maximum number of results to return (default 50). - Metric Type: Choose between Quantile or Average metrics. - Order: Sort order of results (Ascending or Descending). - Page: Pagination page number. - Period: Granularity of results (Daily or None). - Project ID: Target project identifier (required for account-level API keys). - Quantile: Percentile value for quantile metrics (default 75). - Scope: Scope filter. - Segment IDs: Multiple segments separated by commas for intersection filtering. - Start Date: Start date of the analysis range. - State: Status filter. - To: End date of the query date range. |
Output
The output JSON contains the response from the Contentsquare Metrics API endpoint for page web vitals. It typically includes an array of web vital metrics related to the specified page group, such as:
- Loading times (e.g., Largest Contentful Paint)
- Interactivity measures (e.g., First Input Delay)
- Visual stability metrics (e.g., Cumulative Layout Shift)
- Other custom or core web vitals provided by Contentsquare
The exact structure depends on the API response but generally consists of metric names, values, timestamps, and possibly segmentation details.
No binary data output is produced by this operation.
Dependencies
- Requires an API authentication token obtained via OAuth2 client credentials flow using:
- Client ID
- Client Secret
- Optional Project ID and Scope
- The node makes HTTP requests to the Contentsquare API endpoints.
- Proper n8n credentials configuration is necessary to store and provide these authentication details securely.
Troubleshooting
- Missing Client ID or Client Secret: The node will throw an error if these credentials are not set. Ensure your API credentials are correctly configured in n8n.
- Missing Required Parameters: For this operation, the "Page Group ID" must be provided; otherwise, an error is thrown.
- Failed to Retrieve Access Token or Endpoint: If the OAuth token request fails, check network connectivity, credential validity, and API availability.
- API Errors: Any API call failure will result in an error message prefixed with "Error calling Contentsquare API". Check the error description for details.
- Invalid Query Parameters: Ensure dates are valid and in correct order (startDate before endDate), numeric fields are numbers, and enumerated options are valid.
- Empty or Unexpected Response: If the API returns no content or unexpected data, verify the query parameters and the existence of data for the specified page group.