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 web pages, zones, and site activity. Specifically, the "Get Zone Time Before First Tap" operation fetches the metric representing the number of seconds between when a screen loads and the first tap on a specified zone element within that screen.

This node is beneficial for digital analysts and marketers who want to understand user engagement timing on interactive elements in mobile app screens or web pages. For example, it can help identify how quickly users interact with key zones after a screen appears, which can inform UI/UX improvements or A/B testing strategies.

Practical use cases include:

  • Measuring user hesitation or immediacy in tapping specific zones on mobile apps.
  • Comparing time-to-first-tap across different device types or segments.
  • Monitoring changes in user interaction speed after UI updates.

Properties

Name Meaning
Zone ID Numeric identifier of the zone (interactive area) for which the metric is requested. This is required to specify the target zone.
Query Parameters Optional filters and parameters to refine the data retrieval. Includes:
- Device: Filter by device type (All, Desktop, Mobile, Tablet).
- Start Date / End Date: Define date range.
- Limit: Max results count.
- Metric Type: Quantile or Average.
- Order: Ascending or Descending.
- Page: Pagination page number.
- Period: Granularity (Daily or None).
- Project ID: Target project for account-level API keys.
- Goal ID, Segment IDs, Scope, State, Format, Frequency, From, To, IDs: Various additional filters to customize the query.
- Quantile: Percentile value used if metric type is quantile (default 75).

Output

The output is a JSON array where each item contains the response from the Contentsquare API for the requested metric. The structure depends on the API's response but typically includes:

  • The metric value(s) representing the time before the first tap on the specified zone.
  • Additional metadata such as timestamps, device breakdowns, or segment information depending on query parameters.

No binary data output is produced by this node.

Example output snippet (conceptual):

[
  {
    "zoneId": 123,
    "timeBeforeFirstTap": 4.5,
    "device": "mobile",
    "date": "2024-05-01"
  }
]

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 flow against the Contentsquare API.
  • 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.
  • Zone ID Required: If the Zone ID property is empty when calling this operation, an error will be thrown. Always provide a valid Zone ID.
  • Failed to Retrieve Access Token or Endpoint: Indicates issues with authentication or API availability. Verify credentials and network connectivity.
  • API Errors: Any HTTP or API errors are wrapped and reported with messages prefixed by "Error calling Contentsquare API". Check the error message and stack trace for details.
  • Invalid Query Parameters: Providing invalid or conflicting query parameters may cause API errors. Validate parameter values according to the API documentation.

Links and References

Discussion