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 related to web pages. Specifically, the "Get Page Views per Visit" operation under the "Metrics API" resource fetches the average number of times a particular page is viewed during a single visit. This metric helps understand user engagement by showing how often visitors return to or refresh a page within their session.
Common scenarios where this node is beneficial include:
- Analyzing user engagement on specific pages to optimize content or layout.
- Monitoring page popularity and repeat views to identify potential issues or interests.
- Comparing page views per visit across different devices or segments for targeted marketing.
For example, a digital marketer might use this node to track how many times users view a product page per visit, helping to assess interest levels or detect navigation difficulties.
Properties
| Name | Meaning |
|---|---|
| Page Group ID | The identifier of the page group for which the metric is requested. This is required to specify the target page group in the query. |
| Query Parameters | A collection of optional filters and settings to refine the data retrieval. Options include: - Device: Filter by device type (All, Desktop, Mobile, Tablet) - Start Date / End Date: Define date range - Limit: Max results to return - Metric Type: Quantile or Average - Order: Ascending or Descending - Period: Granularity (Daily or None) - Project ID: Target project for account-level API keys - Segment IDs: Filter by segments - Other filters like Goal ID, Scope, State, etc. |
Output
The output is a JSON array containing the response from the Contentsquare API for the requested metric. The structure typically includes statistical data about page views per visit for the specified page group and filters. The exact fields depend on the API response but generally provide numeric values representing averages or quantiles over the selected period.
No binary data output is produced by this operation.
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 before making API requests.
- Network access to
https://api.contentsquare.comis necessary. - Proper configuration of the API credentials in n8n is mandatory.
Troubleshooting
- Missing Client ID or Client Secret: The node will throw an error if these credentials are not provided. Ensure that the API credentials are correctly set up.
- 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: Indicates issues with authentication or API availability. Verify credentials and network connectivity.
- API Errors: If the API returns errors, they are wrapped and presented as node errors with messages indicating the problem.
- Empty or Unexpected Responses: Check the query parameters and ensure the date ranges and filters are valid and that data exists for the specified criteria.
Links and References
- Contentsquare API Documentation (general reference for API endpoints and usage)
- OAuth2 Client Credentials Flow: https://oauth.net/2/grant-types/client-credentials/
- n8n HTTP Request Node Documentation: https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest/ (for understanding request handling)