Kernlift

View accounts and paid orders by country

Compare account and settled-order totals by country over a date range.

/admin/countries groups accounts and settled orders by country code in a map and sortable table. It reads your application database and needs no third-party analytics account.

Before you begin

  • countries.read. See Roles and permissions.
  • Accounts with a country recorded. An account whose country is unknown is counted under UNKNOWN, so the totals still add up.

Set it up

Open the page

Open /admin/countries. The page loads a default date range. The range, start and end are URL search parameters, so a copied link preserves the selected window.

Select a date range

Choose Today, Yesterday, 7 days, 30 days or a custom range, then select Apply. The map and table update together. Compare Users, Created orders, Paid orders and Paid amount for the selected interval.

The page shows aggregate country totals only; it does not expose an individual user's location or provide a drill-down into accounts. Country is captured from supported request headers when a user signs in. If the platform provides no country header, that account is counted under UNKNOWN.

Search parameters

Prop

Type

Country names are localised from the two-letter code in src/lib/admin-countries.ts. The database does not store the name.

Verify

  1. Open /admin/countries. The map and the table render, and their totals match the summary row.
  2. Narrow the range. Both the map and the table change together.
  3. Place a test order from an account with a country set. After the webhook settles it, the amount appears against that country.
  4. Sign in as a role without countries.read. The page denies access.

Reference

If every row is UNKNOWN, check whether the platform forwards a country header and have a user sign in again. Existing sessions keep the country recorded when they were created.

Next steps