Skip to main content
The Explorer lets you build custom analytics queries using a flexible query builder (AftersellQL). You can select metrics, group results by dimensions, apply filters, and visualize data in charts or tables. Saved queries can be added to reports as widgets for ongoing monitoring.
You build queries visually with menus — no syntax required. If you prefer to type queries directly, the Explorer also exposes the underlying AftersellQL text. See Writing AQL queries below for the syntax reference.

Available metrics

These are the metrics you can pick in the Explorer, grouped the same way the metric picker groups them.

Revenue & profit

Conversions

Engagement

Store performance

Rokt network


Dimensions

Dimensions let you break down metrics by a specific attribute. Not all dimensions are compatible with every metric.
Some dimension and metric combinations are incompatible. For example, Decline rate and Show rate cannot be broken down by Currency. The Explorer automatically prevents incompatible combinations.

Available dimensions

Unavailable dimensions

The following dimensions are a work in progress. They appear in the picker but are not yet available as a breakdown. Instead, they show as ‘Not compatible’ for every metric. This document will be updated when these dimensions are fully implemented.

Writing AQL queries

Every query you build in the Explorer is an AftersellQL (AQL) statement. Most of the time you build queries visually — picking metrics, dimensions, filters, and a date range from menus — and never need to write AQL by hand. For power users, the Explorer also exposes the underlying query as editable text. This section is the reference for that text form: what the clauses mean, what values they accept, and a few ready-to-use examples.

How an AQL statement reads

An AQL statement is a single question made of clauses. Only SELECT and a time range (SINCE) are required; everything else is optional. When you include optional clauses, they must appear in the order shown below.
A minimal example — daily upsell revenue and accept rate for the last 30 days:
Keywords are not case-sensitive (SELECT and select both work) and statements do not end with a semicolon. String values are wrapped in double quotes; numbers and lists are not.

Picking what to measure and how to slice it

  • SELECT lists the metrics to measure, separated by commas — for example SELECT revenue, impressions, accept_rate.
  • GROUP BY breaks those metrics down by one or more dimensions, such as date, device, surface, or funnel. Without GROUP BY, you get a single total for the whole period.
For the full list of available metrics and dimensions — and which combinations are allowed — see Available metrics and Available dimensions above. The Explorer prevents incompatible metric and dimension combinations automatically.

Filtering with WHERE

WHERE narrows the data before it is measured. Combine conditions with AND.
Supported comparisons are =, !=, IN, NOT IN, >, <, >=, and <=. Use a list with IN to match several values:

Time ranges and comparisons

Every query needs a time range, set with SINCE. Use a preset or a custom window. Available presets: last_1d, last_7d, last_30d, last_90d, this_month, last_month, and this_year.
  • GRAIN sets the bucket size for time series — hour, day, week, or month.
  • COMPARE overlays a second period so you can see change at a glance. Use previous_period (the equal-length window immediately before) or previous_year (the same window shifted back one year).

Choosing a chart and timezone

These optional clauses are usually set for you by the Explorer’s visual controls, but you can also write them directly:
  • CHART sets how the result is displayed: scorecard, line_chart, bar_chart, area_chart, funnel_chart, or table.
  • TIMEZONE sets the timezone used to bucket dates, as a quoted IANA name — for example TIMEZONE "America/New_York". Defaults to UTC.
The funnel_chart type has specific requirements:
  • Placement mode — Group by placement and select one metric. Stages are ordered by the canonical placement sequence (upsell default → downsell → additional upsells). Only the first metric is plotted; additional selected metrics are noted in a footnote.
  • Metric mode — Select two or more metrics with no GROUP BY. Each metric becomes a funnel stage in query order (for example, SELECT impressions, conversions shows an impressions → conversions drop-off). All metrics must share the same unit (for example, you cannot mix currency and percentage metrics).

Sorting and limiting

  • ORDER BY sorts results by a metric or dimension, with ASC or DESC.
  • LIMIT caps the number of rows returned — useful for “top N” style questions.

More examples

Once you have a query you like, save it and add it to a report as a widget so it keeps updating — see Manage widgets. To remove a widget you no longer need, load it in the Explorer and click Delete in the title bar. Deleting a widget removes it from every report it appears on. The Delete button is only shown for widgets you own; global template widgets are read-only.

Exporting results

The Explorer shows your query results on screen as a scorecard, chart, or table — it does not download a file directly from the query view. To get the results as a file, save the query and add it to a report as a widget. Each widget has its own Export to CSV button that downloads the widget’s data as a .csv file. For the standard Analytics-page exports (Excel and CSV), see Exporting your data.

Timezone support

By default, queries run in UTC. You can override the timezone for any query directly in the Explorer toolbar, so that date-bucketed results (daily, weekly, monthly breakdowns) reflect your local time rather than UTC.

Setting a timezone for a query

  1. Open the Explorer in your Aftersell admin.
  2. In the toolbar, click the Timezone selector (next to Compare).
  3. Choose one of the available timezones from the list, or select Account default to use the timezone configured in your analytics settings.
  4. Run your query. Results are bucketed using the selected timezone.
The selected timezone is saved with the query. When you save and reload a query, the timezone is restored automatically.

Account default timezone

If you have Lock reporting timezone enabled in your analytics settings, selecting Account default in the toolbar uses that locked timezone for your query. The toolbar label shows the resolved zone, for example Timezone: Account default (Paris (CET)). If Lock reporting timezone is not enabled, Account default falls back to UTC.

Specifying a timezone in AQL

You can also specify a timezone directly in your AQL query using the TIMEZONE clause, which appears between CHART and ORDER BY:
When present, the clause overrides the toolbar selection for that query. The timezone is preserved when you save and reload the query.

Available timezones

The timezone picker includes the following options:

How timezone affects query results

When a timezone is set, date-bucketing in your query uses local time instead of UTC. For example, an event that occurred at 2026-03-29T01:30:00Z (UTC) falls on March 28 in New York time (ET) but on March 29 in Paris time (CET). Setting the correct timezone ensures your daily, weekly, and monthly breakdowns match your business reporting expectations. Queries that do not include a timezone — including previously saved queries — continue to run in UTC, so existing results are not affected.

Need help?

If you have questions about the Explorer or want to enable access, contact the Aftersell support team through the in-app chat.