Contentsquare icon

Contentsquare

Use the Contentsquare API

Actions76

Overview

This node integrates with the Contentsquare API to retrieve detailed metrics about user behavior and site performance. Specifically, the "Get Site Pageview Average" operation fetches the average number of page views during a session on a website, where each page refresh counts as one view. This metric helps understand user engagement by showing how many pages users typically visit per session.

Common scenarios for this node include:

  • Analyzing overall user engagement on a website.
  • Monitoring changes in user browsing patterns over time.
  • Comparing pageview averages across different device types or segments.

For example, an e-commerce analyst might use this node to track if users are viewing more pages per session after a website redesign, indicating improved navigation or content interest.

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 by segment IDs (comma-separated list)
Limit Maximum number of results to return (minimum 1, default 50)
Metric Type Metric calculation type; options: Quantile, Average
Order Order of results; options: Ascending, Descending
Page Page number of results to retrieve
Period Granularity of results; 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, ignored if metric type is Average)
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 JSON contains the response from the Contentsquare Metrics API endpoint for site pageview average. It typically includes numerical values representing the average number of page views per session, possibly broken down by filters such as device type or date range.

If the API returns no content, the node outputs a status code message "204 No Content".

No binary data output is produced by this operation.

Dependencies

  • Requires an API authentication token obtained via OAuth2 using a client ID and client secret.
  • The node expects valid credentials configured in n8n that provide access to the Contentsquare API.
  • Network access to https://api.contentsquare.com is required.

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.
  • Failed to retrieve access token or endpoint: Indicates issues with authentication or API availability. Verify credentials and network connectivity.
  • Required parameters missing: For this operation, ensure that any mandatory parameters (like project ID if needed) are provided.
  • API errors: If the API returns an error, the node throws a descriptive error including the message from the API. Check the API documentation for error codes and meanings.
  • Empty or unexpected responses: May indicate incorrect query parameters or no data available for the specified filters.

Links and References

Discussion