Contentsquare icon

Contentsquare

Use the Contentsquare API

Actions76

Overview

This node integrates with the Contentsquare API to retrieve detailed website metrics and user behavior data. Specifically, the "Get Site Conversions" operation under the "Metrics API" resource fetches the number of sessions where a specified goal was reached on the site. This is useful for analyzing conversion performance over time or across different segments.

Common scenarios include:

  • Measuring how many users completed a specific goal (e.g., form submission, purchase) during a given period.
  • Comparing conversions across device types or user segments.
  • Tracking conversion trends to optimize marketing campaigns or website design.

Example: A marketer wants to know how many sessions resulted in a newsletter signup goal completion last month, filtered by mobile devices only.

Properties

Name Meaning
Device Filter analysis by device type. Options: All, Desktop, Mobile, Tablet.
End Date End of the date range for analysis (must be after Start Date).
Format Format of the query date range (string, usage depends on API specifics).
Frequency Filter based on export frequency (string).
From Filter based on export format (string).
Goal ID Numeric ID to specify a non-ecommerce goal for which to return conversion metrics.
IDs Comma-separated list of segment IDs to filter results matching these segments.
Limit Maximum number of results to return (minimum 1, default 50).
Metric Type Type of metric aggregation. Options: Quantile, Average. Default is Quantile.
Order Order of results list. Options: Ascending, Descending. Default is Descending.
Page Page number of results to retrieve (for pagination).
Period Granularity of results; can only be used on date ranges larger than one day. Options: Daily, None. Default is None.
Project ID Target project ID (required only for account-level API keys).
Quantile Percentile value used if metric type is Quantile (default 75). Ignored if metric type is Average.
Scope Filter based on scope (string).
Segment IDs Numeric segment IDs separated by commas to retrieve metrics for their intersection.
Start Date Beginning of date range for analysis (must be before End Date).
State Filter based on status (string).
To End date of the query date range (string, possibly redundant with End Date).

Output

The output is a JSON array containing the response from the Contentsquare Metrics API endpoint for site conversions. The structure depends on the API response but generally includes:

  • Number of sessions where the specified goal was reached.
  • Breakdown by any filters applied (device, segments, date range).
  • Pagination details if applicable.

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.
  • The node authenticates via OAuth2 client credentials flow to obtain an access token.
  • The base API endpoint URL is dynamically retrieved upon authentication.
  • 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.
  • Failed to retrieve access token or endpoint: Indicates issues with authentication credentials or network connectivity.
  • Required parameters missing: For example, if a required parameter like Page Group ID or Zone ID is missing for other operations, the node throws an error. For this operation, ensure that the necessary query parameters like Goal ID and date range are correctly set.
  • API errors: Any HTTP or API errors are caught and rethrown with descriptive messages including the original stack trace if available.
  • Empty or malformed responses: The node attempts to parse string responses as JSON; if parsing fails, it returns raw text.

Links and References

Discussion