d8a_run_query
Use this to answer traffic and conversion questions with numbers: tables grouped by dimensions (e.g. sessions by source), time series (a time_bucket column), goal conversions, and period comparisons (week over week, before and after a release). Columns use exact catalog IDs. Dates are inclusive YYYY-MM-DD in the property timezone, or a preset. With compare, groups are joined with previous values and deltas; time series come back as two separate series. Deltas are observations, not proof of cause. Present columns by their label, the name the app shows. Use d8a_run_funnel for funnels and d8a_run_paths for journeys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Rows per period, 1-500. Defaults to 100. | |
| offset | No | Rows to skip, for paging a single period. Not allowed with compare. | |
| preset | No | Instead of dates. last_week is the previous Sunday-Saturday. | |
| totals | No | Also return backend totals over every matching group (grouped metric queries only). | |
| columns | Yes | Dimensions to group by and metrics to compute, in output order, by exact catalog ID. A column may add a transformation, e.g. time_bucket with args [day] for a daily series. | |
| compare | No | Also run the same request for a comparison period: previous_period (the same number of days just before), previous_year (the same dates a year earlier) or explicit dates. | |
| date_to | No | Last day (inclusive), YYYY-MM-DD, in the property timezone. | |
| filters | No | Row filters: the outer list is OR-ed, each inner list AND-ed. | |
| order_by | No | Sort by column index. Defaults to the first metric descending, then dimensions ascending. | |
| date_from | No | First day, YYYY-MM-DD, in the property timezone. | |
| property_id | Yes | Property ID from d8a_list_properties. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | Yes | ||
| result | No | ||
| previous | No | ||
| timezone | Yes | ||
| warnings | Yes | ||
| comparison | No | ||
| property_id | Yes | ||
| totals_note | No | ||
| generated_at | Yes | ||
| compare_period | No |