Contentsquare icon

Contentsquare

Use the Contentsquare API

Actions76

Overview

This node integrates with the Contentsquare API to retrieve detailed user behavior and performance metrics related to website zones, pages, sites, and other entities. Specifically, the "Get Zone Revenue per Tap" operation fetches the average revenue generated per tap on a particular zone within an app. This is useful for analyzing how effective specific interactive areas (zones) are in generating revenue through user taps.

Common scenarios include:

  • Mobile app analytics teams wanting to measure revenue impact of tappable UI elements.
  • Product managers assessing which zones drive higher monetization.
  • Marketing analysts correlating user engagement with revenue generation on app zones.

Example: Fetching the average revenue per tap on a promotional banner zone in a mobile app during a specified date range to evaluate its effectiveness.

Properties

Name Meaning
Zone ID Numeric identifier of the zone for which the revenue per tap metric is requested. This is required to specify the target zone.
Query Parameters A collection of optional filters and settings to refine the query results:
- Device: Filter by device type (All, Desktop, Mobile, Tablet).
- Start Date / End Date: Define analysis date range.
- Limit: Max number of results.
- Metric Type: Quantile or Average.
- Order: Ascending or Descending.
- Page: Pagination page.
- Period: Granularity (Daily or None).
- Other filters like Goal ID, Segment IDs, Project ID, Scope, State, etc., to customize the data retrieval.

Output

The output is a JSON array containing the response from the Contentsquare Metrics API endpoint for zone revenue per tap. The structure depends on the API response but generally includes:

  • Metrics related to revenue generated per tap on the specified zone.
  • May include breakdowns by time period, device type, segments, or other filters applied.
  • If no content is returned, a status code message "204 No Content" is provided.

No binary data output is involved.

Dependencies

  • Requires valid Contentsquare API credentials including Client ID, Client Secret, and optionally Project ID and Scope.
  • The node performs OAuth2 client credentials flow to obtain an access token before making API requests.
  • Network access to https://api.contentsquare.com is necessary.
  • Proper configuration of credentials in n8n is required to authenticate API calls.

Troubleshooting

  • Missing Client ID or Client Secret: The node will throw an error if these credentials are not set. Ensure credentials are configured correctly.
  • Zone ID Required: For this operation, the Zone 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 starting with "Error calling Contentsquare API".
  • Empty or Unexpected Response: If the API returns empty or non-JSON responses, the node attempts to handle gracefully but verify input parameters and API status.

Links and References

Discussion