Install
- With a coding agent: in Dashboards & Apps, open Manage on your Metabase row and copy Copy prompt for a new Metabase or Copy prompt for an existing Metabase into Codex or Claude Code. The agent clones the template, follows its
AGENTS.md, asks only for missing details and private file paths, and 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 (defaultonline_dtc) for summary, store, product, geography, order and retention views; Ad platform for paid marketing and creatives; As-of month for retention; and value filters such as Compare with, Period or Shipping country 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, the same period last year or 52 weeks earlier, as the App Starter does. 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, with the one before (a shorter previous month compares through its last day); any other range with the same number of days just before it. A second comparison on the same dates as the first is shown once. Each change is the selected value divided by the comparison value, minus one. Trends compare day for day; cumulative values sum each day from the period start, so ratios stay ratios of sums.
- 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_rowscounts 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 Online DTC summary. 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. - 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; 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, including orders SourceMedium does not count as valid, unless Order population is Valid orders. 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, with 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: sums, counts, averages, minima and maxima, sums over a stated channel list or boolean filter, and same-table ratios, each with a physical date and standard time grains. Everything else is listed in the plan’s unsupported section with a reason, 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, or copy a managed question and remove its SM_METABASE_V1 ownership line from the copy only.

