Install
- With a coding agent: in Dashboards & Apps, under Run it yourself, choose Install the template on Your own Metabase, or Manage on your Metabase key. Then copy Copy prompt for a new Metabase or Copy prompt for an existing Metabase into Codex or Claude Code. The agent clones your copy of the template and follows its
AGENTS.md. It asks only for missing details and private file paths, and it shows you a plan before it changes anything. - With one command: follow Install by hand in the template’s README. It needs Node.js 22 or later and a Metabase API key. It never needs your warehouse key or changes warehouse permissions.
SM ... SQL snippets.
The tabs
Each tab shows only the filters its cards use. Sales Channel (every sales channel until you pick one) filters the summary, store, product, geography, order and retention views. Ad platform filters paid marketing and creatives, and As-of month filters retention. Value filters such as Compare with, Period or Shipping country appear where a card reads them. Filters keep their values across tabs, so a campaign, country, region or order you select carries over. A card whose tables your warehouse does not deliver is left out without hiding the rest of its tab.
Use one store and one reporting currency when comparing money. Filters navigate data. They do not restrict access.
What the numbers mean
The summary questions use the definitions in Connect Metabase: order measures count the valid sales channels, ad spend and sessions count every row, and ratios divide totals. The other tabs add their own populations.Period comparison
Periods run from the first to the last selected date that has rows. Compare with and Second comparison choose the previous period, last year, the same period last year or the same weekdays last year, as the Next.js App template does. Second comparison starts on last year. That is the same weekday last year for a single day and the same period last year otherwise. The previous period follows what the dates are:- A single day compares with the same weekday a week earlier.
- A calendar month, quarter or year, complete or to date, compares with the one before. A shorter previous month compares through its last day.
- Any other range compares with the same number of days just before it.
Revenue and deductions
Amounts keep their published signs: signed discounts and refunds add to gross revenue. Unreconciled difference makes any remaining adjustment visible. It does not identify a cause.New versus repeat purchases
Counts are published order measures, not unique people. Classification coverage varies by source, so the two rows need not add up to the headline totals.Business summary and performance tables
Weeks start Monday and only selected dates contribute, so the first and last periods can be partial and are marked so. The last row is the selected period total.days_with_rows counts represented dates, not complete data coverage.
All stores
Each store is its own row. There is no total row: stores can report in different currencies.Paid marketing and Creatives
source_systemis the advertising platform.sm_channelis the sales channel.- These cover every sales channel, so spend can exceed the summary’s spend when you limit Channel to one value.
- Platform-reported revenue and conversions keep each platform’s attribution and can overlap. ROAS is not MER or incrementality.
- Campaign identity includes platform, account and campaign ID.
- Creative image links come from the platform and can expire.
Creative coverage
The ranking includes ads with a creative ID. Select one to see its current copy, images and video links where supplied. Campaign or affiliate spend without a creative ID still counts in Paid marketing. In DemoCo, a platform can therefore have spend and an empty creative ranking for the same dates. Open the public Creatives dashboard.Products
Valid orders by processed date, not refund-event date. Refund amounts and units are shown with inverted signs. Missing cost differs from zero cost: a positive missing-cost count makes gross profit incomplete. Gainers and decliners rank by the change against Compare with. A product sold only in the comparison period still ranks as a decliner.Retention
- The
all_ordersslice, the 12 acquisition months ending with the as-of month, and only elapsed ages through it. Month 1 is the next calendar month. - Monthly retention is active customers over cohort size. Second purchase is customers who purchased a second time over cohort size. LTV and LTR are cumulative gross profit and net revenue per cohort customer.
- Without an Acquisition segment every acquisition order counts. Pick one (from Acquisition segments) to see that segment’s cohorts.
- Compare cohorts at the same age and keep cohort size beside rates. Never pool channels or average rates across unequal cohorts.
Geography
Valid orders by shipping country and processed date. US states are normalized to two-letter codes, and unknown destinations are grouped as(unknown). Mapped coverage is the share of orders the map can draw: a two-letter country code, or a US state code when the country is the US.
Orders
Every processed order in the selection is listed, including orders SourceMedium does not count as valid. If Order population is Valid orders, only valid orders are listed. Check the Valid column before counting. Attribution evidence groups describe the published signals. The priority-1 signal is the winner, and nothing reassigns credit.Data
Freshness is each source’s latest published data date in the data dictionary. Pipeline freshness, period completeness and quality checks are not published.Models and metrics
The installer creates a model for every table in your delivereddim_data_dictionary that is active and synced in the connection. Each model carries the dictionary’s descriptions and display units. Include the dictionary’s dataset_name values in the connection’s Only these… list for the models you want. Your key must already have access.
It also creates Metabase metrics for the catalog definitions Metabase can express exactly. These are sums, counts, averages, minima and maxima, sums over a stated channel list or boolean filter, and same-table ratios. Each has a physical date and standard time grains. Everything else is listed in the plan’s unsupported section with a reason and is never approximated. Shared SQL snippets carry the same definitions into the native questions, so a definition change reaches every question on the next refresh.
Make it yours
Change a question’s SQL, add a question or a tab, or remove one by editing the template’sfoundation folder. Customize the foundation walks through it. Keep custom content outside the managed collection. Alternatively, copy a managed question and remove its SM_METABASE_V1 ownership line from the copy only.

