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 Visits" operation under the "Metrics API" resource fetches the number of sessions where a particular page has been viewed at least once.
Use cases include:
- Analyzing how many visits a specific page group receives over a given time period.
- Filtering visits by device type or other query parameters to understand audience segmentation.
- Monitoring traffic trends for specific pages to optimize content or UX.
Example: A marketing analyst can use this node to pull the number of visits for a landing page during a campaign period, filtered by mobile devices, to evaluate campaign effectiveness.
Properties
Name | Meaning |
---|---|
Page Group ID | The identifier of the page group for which to retrieve visit metrics. This is required to specify the target page group. |
Query Parameters | Optional filters and settings for the query. Includes: - 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). - Other optional filters like Goal ID, Segment IDs, Project ID, etc. |
The full list of query parameters includes device filtering, date ranges, pagination, ordering, metric types, and more, allowing flexible and precise data retrieval.
Output
The output is a JSON array containing the response from the Contentsquare Metrics API endpoint for page visits. The structure depends on the API's response but generally includes metrics such as:
- Number of visits (sessions) where the specified page group was seen.
- Additional metadata depending on query parameters (e.g., breakdowns by date if period is daily).
If the API returns no content, the node outputs a status code message indicating "204 No Content".
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential with client ID, client secret, project ID, and scope configured in n8n credentials.
- The node authenticates via OAuth2 client credentials grant to obtain an access token before making API requests.
- Network access to
https://api.contentsquare.com
is necessary.
Troubleshooting
- Missing Client ID or Client Secret: The node will throw an error if these credentials are not provided. Ensure your API credentials are correctly set up.
- Missing Required Parameters: For this operation, "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.
- API Errors: Any HTTP or API errors are wrapped and reported with messages prefixed by "Error calling Contentsquare API".
- Empty Responses: If the API returns no data, the node outputs a 204 status message. Verify your query parameters and date ranges.
Links and References
- Contentsquare API Documentation (general reference for API endpoints and metrics)
- OAuth2 Client Credentials Grant: https://oauth.net/2/grant-types/client-credentials/
This summary focuses on the "Metrics API" resource and the "Get Page Visits" operation as requested.