Supermetrics icon

Supermetrics

Query marketing data using Supermetrics

Actions5

Data → Query

AI-generated

Summary

Query marketing data from a specified Supermetrics data source by specifying the data source ID, accounts, fields, and a date range, optionally filtering the results.

Inputs

  • Data Source Name or ID (required) — Select the Supermetrics data source to query. Choose from a dynamically loaded list or specify an ID via expression.
  • Account Names or IDs — Select one or more accounts within the chosen data source to fetch data from. Options are dynamically loaded based on the selected data source. You may specify IDs via expressions.
  • Field Names or IDs (required) — Select one or more fields (metrics or dimensions) to retrieve from the data source. This list is dynamically loaded based on the chosen data source.
  • Date Range — Specify the start and end dates for the data query. Dates can be absolute (yyyy-mm-dd) or relative (e.g., 'yesterday', 'first day of January'). Defaults to start of January to yesterday.
  • Optional Parameters — Additional parameters for the query, including a filter string to filter data according to conditions on fields (e.g., 'impressions > 0 AND clicks > 0'). The filter must reference selected fields from the same data source.

Output shape

a list of JSON objects representing the queried rows of marketing data from Supermetrics, one item per row

The output includes pagination: if multiple pages of results exist, all pages are fetched and concatenated. Field names correspond to the requested data source fields. Errors during query execution will throw or, if 'continueOnFail' is enabled in the node, return error objects paired with input items.

Examples

Example 1: Fetch clicks and impressions metrics from Google Analytics Accounts for current year's start to yesterday

Set Data Source to GA, select specific GA accounts, choose 'clicks' and 'impressions' fields, and set date range from 'first day of January' to 'yesterday'.

Links

Discussion