Analytics
For anyone who wants to see how their programs are doing rather than read a list. Charts are built from the same filters as the list screens and live on dashboards.
Analytics covers reviews, orders, customers, products, loyalty members, loyalty activity, and loyalty rewards. Other resources will be added, and the charts you save keep working when they are.
The dashboards you start with
Dashboard in the sidebar opens your default dashboard. Every organization starts with two.
Overview is the default, and it reads across the whole store rather than one part of it: the headline numbers for orders, revenue over time, orders by status, new customers over time, review volume, points earned and spent, and members by tier. It is the screen to open first thing in the morning.
Reviews holds five charts about reviews alone: the totals at a glance, review volume over time, the rating distribution, published and held back volume over time, and the average rating by product. Use it for the questions you ask weekly: what the review volume is doing, whether the average rating is moving, how much of the queue is being held back, and which products are getting reviewed.
Both are ordinary dashboards, not fixtures. Rename them, rearrange them, edit their charts, add your own, or delete any of it. If you delete a dashboard it stays deleted; you can rebuild any of its charts from Explore whenever you want them back.
Choosing which dashboard opens
The dashboard marked as the default is the one Dashboard opens. To change it, open the
dashboard you would rather start on and pick Set as default from the ... menu in its
header. Only one dashboard is the default at a time, so the one that held it goes back to
being an ordinary dashboard.
If nothing is marked, the oldest dashboard opens instead, and if you have no dashboards at all you are offered one to create.
What each resource offers
Every resource has a count, measures of its own, and a set of fields to group by. Time
groupings bucket by hour, day, week, month, quarter or year. GET /analytics/schema
returns the full, current list; the highlights:
Review answers are the extra questions reviewers answer beside the star rating, one row per answer. Group by question to compare them, and by answer to see the split within a multi-choice question. Average step is the mean of the scale answers matched, so filter to one scale question before reading it. Unlike the shares the reviews widget shows, this resource counts unpublished reviews too, so filter on published to match the storefront.
Two notes on the numbers. Revenue and average order value are reported in major currency units, and orders in different currencies are added together as-is, so filter or group by currency when your store sells in more than one. An order's status is derived from its timestamps: canceled, delivered, shipped, or placed, in that order of precedence.
Group by a date and a category together to get a series per category, which is how you see whether one product's ratings are moving differently from the rest.
Chart types
The chart type follows from the shape of the question, and only the types that fit are offered:
A table is always available, because every chart deserves a readable twin. Every chart also has a keyboard-reachable table view of the same numbers.
A new chart opens on the type that suits its query, so a date grouping starts as a line and a category as a bar. Pick a type yourself and it sticks: reshaping the query only moves it when the type you picked can no longer draw the result.
Filters
The filter is the same document the resource's list takes, so anything you can narrow a list to, you can chart. Set up the view you want on the list, then chart it. See Filtering.
Reading a chart honestly
Two things that would otherwise mislead you:
The Other bucket. A chart grouped by something with many values (products, customers) shows the top values and collapses the rest into "Other", drawn in a neutral color, sorted last, with a line under the chart saying what was combined. The Other row is recalculated from the underlying records rather than summed from the visible ones, so an average in it is a real average.
Gaps are not zeros. A week with no reviews shows as zero on a count and as a gap on an average, because the average of nothing is not zero. Lines break across a gap rather than dropping to the floor.
Time zones
Charts are bucketed in your organization's time zone, set under Settings → General, so a daily chart matches the day you would call it. Changing the time zone moves the boundaries of every bucket.
Exploring your data
Explore data, in the header of any dashboard, is the place to ask a question before you know whether it deserves a dashboard. Pick a data source, choose what to measure and what to group by, and the chart draws as you build it. There is no name to invent and no dashboard to choose first: it is just you and the query.
Everything you build lives in the page's address, so you can share an exploration by copying the URL, and coming back to it later restores the chart exactly as you left it.
You can also start from a list. The reviews, orders, customers, products, loyalty activity and rewards pages each have an Analyze item in their actions menu that opens Explore with that resource picked and the list's current filter carried over, charting a count over time. The chart and the list you came from show the same records, so "what am I looking at, over time?" is one click away. Reshape the query from there as usual.
When a chart turns out to be worth keeping, click Save to dashboard. Give it a name, pick the dashboard it should live on (or create a new one right there), and you land on that dashboard with the chart added at the bottom.
Saved charts and dashboards
Every chart belongs to exactly one dashboard and carries its own position on it, so a dashboard is the page you read, not a list you assemble from a separate library.
Add a chart from the dashboard itself with New chart, or save one from Explore. New charts land at the bottom; use each card's menu to edit it or delete it.
The header of every dashboard carries the rest of the controls:
- The dashboard menu, which is the button naming the dashboard you are on. It lists every dashboard you have, so switching is one click, and New dashboard at the bottom creates one and takes you straight to it.
- The
...menu, which renames the dashboard, sets it as your default, or deletes it. Deleting a dashboard deletes the charts on it, and you land on whichever dashboard is left. - Explore data, for a question that does not have a home yet.
Arranging a dashboard
A dashboard is a 12-column grid, and every chart on it has its own position and size.
- Move a chart by dragging the grip in its header. The other charts make room as you go, and a quiet outline shows where the chart will land.
- Resize a chart from its right edge, bottom edge, or bottom-right corner. A chart is never narrower than a sixth of the page.
- Without a mouse, focus the same grip and use the arrow keys to move the chart, or hold Shift with the arrow keys to resize it. The grip's tooltip says exactly that.
Every finished drag, resize, or set of key presses saves the whole layout in one step, so what you see after arranging is what everyone sees on the next load. If saving fails, the charts return to their last saved places and a message says so.
On a narrow window or a phone the charts stack in a single column in reading order, and arranging is turned off until you are back on a wider screen.
The chart editor
Creating or editing a chart opens a full-page editor: the query controls sit in a rail on the left and a live preview fills the rest, redrawing from your real data as you change things. Pick what to measure and what to group by from the lists the data actually offers, and only the chart types that can draw the resulting query are available, so you cannot build a chart that will not save.
The filter is the same one the list screens use, with the same dropdown fields, so you
never have to write a filter document by hand for an everyday question. A filter too
complex for the fields (an $or, a metadata path) can still be entered in the bar's JSON
mode, and if the definition would be rejected, the editor says why and holds the save
button until it is fixed.
If a saved chart stops making sense because what it measured changed, the card says what broke rather than drawing a broken chart. A chart whose type no longer fits its query quietly falls back to one that does.
Asking the assistant for a chart
You do not have to build one by hand. Ask the assistant a question about how many, how much or the trend over time, and it draws the answer in the chat. Ask it to keep that chart and it offers to save it onto one of your dashboards, waiting for your approval first. It picks a chart type that suits the query rather than guessing at one, and it can list what you have already saved.
Over the API
POST /analytics/query takes a query document and returns rows, so you can build the same
aggregates into your own reporting:
GET /analytics/schema returns every resource with its measures and dimensions, which is
what to read rather than hard-coding the lists above. See the
API reference.