Adding and Configuring Cards

~5 min read

Adding and Configuring Cards

Adding a Card

  1. Open the Edit Dashboard page.
  2. Click Add Card to open the card picker.
  3. Choose a preset from the gallery, or select Custom to start from a blank SmashGL query.
  4. The card appears in your dashboard with its default configuration.

Configuring a Card

Click the Edit button next to any card to open the card editor. You'll see two tabs:

Simple Tab

The Simple tab lets you configure your card using plain controls — no code required.

Setting What it does
Card title The label shown at the top of the card on the dashboard
Visualization How the data is displayed (see Choosing the Right Visualization)
Time Window The period of data to show (e.g. "Last 30 days", "This month")
Compare with Which period to compare against for the % change calculation
Goal Optional target value — enables the OKR progress bar
Goal commitment Hard (default, strict bands) or Soft (lenient bands for aspirational/stretch goals — progress bar renders with a dashed border)
Metric type Cumulative (period total, Forecast extrapolates linearly), Ratio (running value IS the Forecast — uptime %, refund rate, conversion rate), or Level (snapshot count). Usually auto-detected from the column name.
Direction Higher is better (default — goal is a minimum) or Lower is better (goal is a maximum not to exceed). Set manually for refund rate, return rate, cost per click, churn. Usually auto-detected.
Number format Auto (default — inferred from the metric column), Percentage (shows 1.80%, no compact abbreviation), Currency (prefixes store currency symbol), or Number (plain count). Use Percentage for rate metrics that return a raw decimal.
Compact notation When enabled (default), large numbers are abbreviated as 1.2k, 3.4M. Uncheck to always show full numbers. Has no effect on Percentage format.
Alert RAG (red/amber/green) pulse on the card border, keyed to goal Status
Trend Show a sparkline chart of the metric over time
Smooth Smooth the sparkline line to reduce day-to-day noise

Code Tab

The Code tab shows the underlying SmashGL query. Advanced users can edit it directly. For full syntax details, see the SmashGL Reference.

Advanced: The Code tab unlocks the full SmashGL language — custom comparison periods, compound goals, threshold goals, gross profit queries, and any metric not available in the Simple tab. See The Code Tab and SmashGL Queries.

Time Window Options

What is "today"? All time windows are based on your store's timezone, as configured in your Shopify admin's timezone settings.

Rolling windows (most common):

Option What it covers
Last 7 days Rolling 7 days ending today
Last 14 days Rolling 14 days ending today
Last 30 days Rolling 30 days ending today
Last 90 days Rolling 90 days ending today

Calendar periods — automatically adjust as time passes:

Option What it covers
This week From the start of the current week to today
This month From the 1st of the current month to today
This quarter From the start of the current quarter to today
This year From January 1st to today

Custom date range — a fixed range you specify by date. Useful for campaigns and seasonal windows.

Calendar periods vs. rolling windows: Calendar periods (This month, This quarter) have a defined end date, which enables the Forecast and Time Left indicators. Rolling windows (Last 30 days) have no end date — Forecast shows "—" for those. See Reading Your Card.

Compare With Options

Option How the comparison is calculated
Previous period (default) An equal-length window immediately before the current window
Previous year The same date range but 12 months earlier
Same day last week The same date range shifted back 7 days
Same period last year (calendar periods only) Same named period last year — e.g. this month vs. the same month last year
Same period last month (calendar periods only) Same weekday-anchored range last month

Goal Types

Goal type How to use it Example
No goal No target — card shows metric and vs-prior comparison only
Grow by % Target is N% above the comparison period's value "Grow 10% vs last period"
Reach a target Fixed number you want to hit "Hit 500 orders this period"
Threshold Binary pass/fail for ratio metrics. Code tab only: use the THRESHOLD clause. "Uptime ≥ 99.98%"
Compound Two or more conditions joined by AND or OR. Code tab only. "Revenue ≥ $15k AND orders ≥ 300"

When a goal is set, the card shows:

Still need help?