> For the complete documentation index, see [llms.txt](https://orbit-b2b.gitbook.io/orbit-b2b-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://orbit-b2b.gitbook.io/orbit-b2b-docs/analytics/overview.md).

# Overview

**Analytics** shows what your B2B business brought in: how much B2B revenue you made, who is buying, and what your B2B pricing cost you. Every figure is read from **Shopify's own sales reports**. The app does not add up, convert or average any of the numbers itself. It shows them as Shopify reports them.

Find it in the app under **Orders → Analytics**.

## Requirements

* Plan: **every plan, including Free**. CSV export is included.
* Permission: the page reads Shopify's reports, which needs one extra permission. If your store installed the app before Analytics existed, you approve it once. Until then the page shows **Reconnect the app to see your analytics** instead of figures. See [Troubleshooting](/orbit-b2b-docs/analytics/troubleshooting.md#reconnect-the-app-to-see-your-analytics).

***

## Which orders are counted

The app tags each B2B order with **`nileva-b2b`** when the order is created. Analytics reports on orders that carry this tag. Orders placed before the tags were renamed carry the older **`orb2b-b2b`** instead, and Analytics counts those too (see [Order tags renamed to `nileva-*`](/orbit-b2b-docs/changelog/changelog.md)). An order gets the tag if **any one** of these is true:

| The order is B2B because…                                                                    | Notes                                                     |
| -------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| The buyer is a contact of one of your **Companies**                                          | No tag needed on the customer                             |
| The buyer carries the tag of one of your **Customer Groups**                                 |                                                           |
| The buyer carries a customer tag that an **active** wholesale or volume pricing rule targets | Covers stores that price by tag and never created a group |
| The app's B2B pricing discounted the order                                                   | For example, a rule that applies to all customers         |

* Tags must match **as a whole tag**, and upper or lower case doesn't matter. A group tag `gold` does not match a customer tagged `goldsmith`.
* Whether an order is B2B is decided **at the moment the order is placed**. If you add a customer to a group later, their earlier orders don't become B2B orders.
* When you use **Apply B2B pricing** on a draft order (in the Shopify admin, under **More actions**), the draft is tagged right away. The order created from it keeps the tag.
* To list these orders in Shopify, go to **Orders** and filter by the tag `nileva-b2b`. Orders placed before the rename carry `orb2b-b2b`, so to list all of them search for `tag:nileva-b2b OR tag:orb2b-b2b`.

**Not counted:**

|                                                | Why                                                                                                         |
| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| **Orders placed before you installed the app** | They were never tagged, so there is no way to tell which ones were B2B                                      |
| **Test orders**                                | Shopify leaves orders paid through a test payment gateway out of its reports, so they never reach this page |
| **Retail orders**                              | Orders that meet none of the conditions above                                                               |

> The **What your B2B pricing cost you** table selects orders a different way. See [below](#what-your-b2b-pricing-cost-you).

***

## The toolbar

Three buttons at the top of the page control every figure on the page.

| Button                                    | Options                                                                                                                                            | Default             |
| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- |
| **Date range** (shows the current range)  | **Today**, **Yesterday**, **Last 7 days**, **Last 30 days**, **Last 90 days**, **Last 12 months**, **Month to date**, **Year to date**, **Custom** | **Last 30 days**    |
| **Compare: …**                            | **Previous period**, **Previous year**, **No comparison**                                                                                          | **Previous period** |
| **Currency** (shows the code, e.g. `USD`) | Your store currency and the other currencies your store sells in                                                                                   | Your store currency |

* A preset range applies as soon as you click it. **Custom** opens **Starting** and **Ending** date fields and a two-month calendar. Pick both dates, then click **Apply**. **Cancel** keeps the range you had.
* **Previous period** is the period of the same length just before the one you picked. **Previous year** is the same period one year earlier.
* The **Currency** button appears only if your store sells in more than one currency. See [Currency](#currency).
* While new figures load, the toolbar shows **Updating…** and the sections below are dimmed. The dimmed numbers are still the **old** figures, so wait for the update to finish before reading them.

***

## Summary tiles

Four tiles across the top of the page:

| Tile                    | What it means                                                                                                                                              |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **B2B net sales**       | Your B2B sales after discounts and returns. Taxes, shipping, duties and fees are not included, so this won't match the order totals you see in Shopify     |
| **B2B orders**          | The number of B2B orders. Each order counts once, however many items it has                                                                                |
| **Average order value** | Shopify's average amount per order, calculated **before** later changes to the order such as returns. It may not equal B2B net sales divided by B2B orders |
| **Buying customers**    | The number of different customers who placed a B2B order. A customer who ordered three times counts once                                                   |

Under each tile is Shopify's percentage change against the comparison period, for example **▲ 12.3% vs Previous period**. The tile shows **No comparison available** when you picked **No comparison**, or when the comparison period was zero and no percentage can be calculated.

***

## B2B net sales over time

A bar chart of **B2B net sales** across your date range. If you're comparing, each bar has a second bar beside it for the comparison period. Both use the same scale, so you can compare their heights directly. Hover over a bar to see its exact amount.

How much time each bar covers depends on the range:

| Date range                                     | One bar per |
| ---------------------------------------------- | ----------- |
| **Today**, **Yesterday**                       | Hour        |
| **Last 7 days**, **Month to date**             | Day         |
| **Last 30 days**, **Last 90 days**, **Custom** | Week        |
| **Last 12 months**, **Year to date**           | Month       |

If there were no B2B sales in the range, the chart reads *No B2B sales in this period.*

***

## Who is buying

This table breaks your B2B sales down three ways. Use the buttons above it to switch:

| View                    | One row per                                                                                                                 |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **Customers** (default) | Customer, by name                                                                                                           |
| **Customer groups**     | Customer group, labelled as described in [How customer groups are labelled](#how-customer-groups-are-labelled)              |
| **Companies**           | Company, as recorded on the order in Shopify. This button appears only after you've created at least one company in the app |

Columns: **Orders**, **Net sales** and **Avg order**. Rows are sorted by highest net sales first, 10 per page. Use **Previous** and **Next** to page through. This table has no comparison column.

A row with no name (no customer name, or no company on the order) is shown as **Unknown**.

***

## What your B2B pricing cost you

This table shows **By customer group** what your B2B pricing gave away, and what you earned after it.

| Column             | What it means                                                                                  |
| ------------------ | ---------------------------------------------------------------------------------------------- |
| **Customer group** | Labelled as described in [How customer groups are labelled](#how-customer-groups-are-labelled) |
| **Orders**         | Number of orders                                                                               |
| **Gross sales**    | Sales before discounts and returns. Taxes, shipping, duties and fees are not included          |
| **Discounts**      | The amount discounts took off these sales                                                      |
| **Returns**        | The value removed from these orders by refunds, returns, cancellations or edits                |
| **Net sales**      | Sales after discounts and returns                                                              |

**Discounts** and **Returns** appear without a minus sign. Both come straight from Shopify, and the app never adds them up itself.

**This table selects orders differently from the rest of the page.** It counts every order your B2B pricing applied to, meaning any order that carries the app's wholesale or volume pricing discount. That includes orders placed through checkout and draft orders the app priced. It does not look at the `nileva-b2b` (or older `orb2b-b2b`) tag. Usually the two sets of orders overlap, but they can differ:

* A B2B customer who paid full price appears in the figures above but **not** in this table.
* An order that got B2B pricing but didn't receive the B2B tag appears **only** in this table.

So this table can show a different order count than **B2B orders**. That's expected and not a bug.

If your B2B pricing hasn't applied to any order in the range, the table reads *Your B2B pricing has not applied to any order in this period.*

***

## How customer groups are labelled

The **Customer groups** view and the cost table label each row by the customer's tags:

| What you see                                                                          | What it means                                                                                                                                                       |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Gold** (a group name)                                                               | Customers who carry the tag of your Customer Group "Gold"                                                                                                           |
| **b2b-vip** · *matched by customer tag*                                               | Customers matched by a tag that one of your active pricing rules targets, not by a Customer Group                                                                   |
| **VIP, Newsletter** · *not in a customer group*                                       | Customers who have tags, but none of them is a group tag or a rule tag. Their orders count as B2B for another reason, for example because they're a company contact |
| **Untagged customers** · *your pricing applies to all customers, so no tag is needed* | Customers with no tags at all, on a store where an active rule targets all customers, all logged-in customers or all logged-out customers                           |
| **Untagged customers** · *no B2B tag on these customers*                              | Customers with no tags at all, on a store without such a rule. For example, a company contact who has no group tag                                                  |

Labels use your groups and rules **as they are now**, not as they were when the order was placed. If you rename a group, its row is renamed too.

***

## Currency

Figures are shown in your store currency unless you pick another one. If your store sells in more than one currency, the **Currency** button lets you view every figure in any of them.

Shopify converts each order **at the rate on that order**. The converted figures show the value of your sales. They are not the exact cash you received in each currency.

***

## Export CSV

Click **Export CSV** (top right) to download a file named after the range, for example `b2b-analytics-30d.csv`. It has three blocks:

| Block                              | Columns                                                                                    |
| ---------------------------------- | ------------------------------------------------------------------------------------------ |
| **Summary**                        | **Metric**, **Value**, **Change**                                                          |
| **Who is buying**                  | **Name**, **Orders**, **Net sales**, **Avg order**                                         |
| **What your B2B pricing cost you** | **Customer group**, **Orders**, **Gross sales**, **Discounts**, **Returns**, **Net sales** |

* **The file contains what's on screen**: the current date range and currency. For **Who is buying**, it contains only the view and page you're on (up to 10 rows). To export another page, go to it and export again.
* Amounts are plain numbers in the currency you selected. **The file doesn't name the currency**, so note which one you used.
* Values are Shopify's raw figures. **Discounts appear as negative numbers** in the file, even though the page shows them without the minus sign. **Change** is Shopify's percentage change. It is empty when there is no comparison.
* Column names follow your admin language.
* A name that starts with `=`, `+`, `-` or `@` gets a leading apostrophe, so spreadsheet apps don't treat it as a formula.
* The button is greyed out until the figures have loaded, and while the reconnect banner is showing.

***

## Next steps

* [Analytics troubleshooting](/orbit-b2b-docs/analytics/troubleshooting.md): missing orders, the reconnect banner, "Unknown" and "Untagged" rows
* [Customer Groups](/orbit-b2b-docs/customer-groups/overview.md): put customers in groups so their sales are reported by group name
* [Target by customer tag or group](/orbit-b2b-docs/wholesale-pricing/customer-targeting.md)
* [Companies](/orbit-b2b-docs/companies/overview.md)
* [Billing & plan](/orbit-b2b-docs/settings/billing.md)
