# Metrics and dimensions

{% hint style="info" %}
This documentation is about an Early Adopter feature and the instructions detailled here are subject to changes. Please contact your usual AB Tasty contact if some instructions are unclear or if something is missing.
{% endhint %}

### Dimensions list

#### How to read this list?

The dimension key is the value you should put in the API's payload.

The parameter name is the corresponding parameter that was sent in the collect API as a [common parameter](https://docs.abtasty.com/client-side/data-apis/universal-collect/uc-common-arguments) or a [specific parameter](https://docs.abtasty.com/client-side/data-apis/universal-collect/uc-hits). `N/A` means that the value doesn't come from an argument. It might be computed during the ingestion process, like the user-agent or the geolocation.

#### EVENT

| Dimension name | Dimension key | Parameter name | Example         |
| -------------- | ------------- | -------------- | --------------- |
| Event Action   | eventAction   | ea             | Click on CTA    |
| Event Category | eventCategory | ec             | Action Tracking |
| Event Label    | eventLabel    | el             | bottom banner   |
| Event Value    | eventValue    | ev             | 4               |

#### TRANSACTION

| Dimension name       | Dimension key       | Parameter name | Example      |
| -------------------- | ------------------- | -------------- | ------------ |
| Affiliation          | affiliation         | ta             | Purchase     |
| Coupon               | transactionCoupon   | tcc            | DISCOUNT20   |
| Currency code        | currencyCode        | tc             | EUR          |
| Item Count           | itemCount           | icn            | 4            |
| Payment method       | paymentMethod       | pm             | VISTA        |
| Shipping method      | shippingMethod      | sm             | FELEX        |
| Transaction ID       | transactionId       | tid            | 156648FFFD65 |
| Transaction Revenue  | transactionRevenue  | tr             | 7960000      |
| Transaction Shipping | transactionShipping | ts             | 0            |
| Transaction Tax      | transactionTax      | tt             | 0            |

#### ITEM

| Dimension name      | Dimension key     | Parameter name | Example         |
| ------------------- | ----------------- | -------------- | --------------- |
| Item Category       | productCategory   | iv             | Cake            |
| Item Quantity       | itemQuantity      | iq             | 4               |
| Item Revenue        | itemRevenue       | ip             | 1990000         |
| Item Transaction ID | itemTransactionId | tid            | 156648FFFD65    |
| Name                | productName       | in             | Bluberry Muffin |
| Product SKU         | productSku        | ic             | EDB543GAC       |

#### SEGMENT

| Dimension name | Dimension key | Parameter name | Example             |
| -------------- | ------------- | -------------- | ------------------- |
| Segment Key    | segmentKey    | s              | userFavMuffin       |
| Segment Value  | segmentValue  | s              | ChocolateChipMuffin |

#### NPS

| Dimension name | Dimension key | Parameter name | Example              |
| -------------- | ------------- | -------------- | -------------------- |
| NPS Feedback   | npsFeedback   | nf             | This shop is awesome |
| NPS Score      | npsScore      | ns             | 8                    |

#### COMMONS

| Dimension name                      | Dimension key                   | Parameter name      | Example                                   |
| ----------------------------------- | ------------------------------- | ------------------- | ----------------------------------------- |
| Browser name                        | browser                         | N/A                 | firefox                                   |
| Browser size (w\*h)                 | size                            | N/A                 | 1536x722, 1873x947, 1920x969              |
| Browser version                     | browserVersion                  | N/A                 | 108.0.1462.76                             |
| Campaign ID                         | campaignId                      | N/A                 | 845675                                    |
| City                                | city                            | N/A                 | Nantes                                    |
| City ID                             | cityId                          | N/A                 | 2971258                                   |
| Country                             | country                         | N/A                 | France                                    |
| Custom Dimension Index              | customDimensionIndex            | cd                  | 0                                         |
| Custom Dimension Value              | customDimensionValue            | cd                  | value                                     |
| Custom Metric Index                 | customMetricIndex               | cm                  | 0                                         |
| Custom Metric Value                 | customMetricValue               | cm                  | value                                     |
| Custom Variable Index               | customVariableIndex             | cv                  | 0                                         |
| Custom Variable Name                | customVarName                   | cv                  | varName                                   |
| Custom Variable Value               | customVarValue                  | cv                  | varValue                                  |
| Customer ID                         | customerId                      | vid                 | 7g0brnhfbmxy4tjp                          |
| Data source                         | dataSource                      | ds                  | WEB, APP                                  |
| Date                                | date                            | N/A                 | 1674464754                                |
| Device                              | device                          | N/A                 | Desktop                                   |
| Hostname                            | hostname                        | dl                  | <https://my-website.com/>                 |
| Is Entrance Page                    | isEntrance                      | N/A                 | true, false                               |
| Is New Visitor                      | isNewVisitor                    | N/A                 | 0, 1                                      |
| Is QA                               | isQa                            | qa                  | true, false                               |
| Is Bot                              | isBot                           | ib (or auto-detect) | true, false                               |
| Language                            | language                        | ul                  | fr-FR                                     |
| Least specific subdivision ISO code | leastSpecificSubdivisionIsoCode | N/A                 | ARA                                       |
| Medium                              | medium                          | N/A                 | organic, referral, cpc                    |
| Month                               | month                           | N/A                 | 1, 12                                     |
| Most specific subdivision ISO code  | mostSpecificSubdivisionIsoCode  | N/A                 | BRU, 28                                   |
| Next Page Path                      | nextPagePath                    | N/A                 | /authentication                           |
| Operating System                    | operatingSystem                 | N/A                 | Linux                                     |
| Operating System Version            | operatingSystemVersion          | N/A                 | NT 10.0                                   |
| Page Path                           | pagePath                        | N/A                 | /s?query=bz                               |
| Page Title                          | pageTitle                       | pt                  | The famouse muffin shop                   |
| Referral Path                       | referralPath                    | dr                  | /contact                                  |
| Region                              | region                          | N/A                 | Brussels Capital                          |
| Screen Name                         | screenName                      | ?                   |                                           |
| Session ID                          | sessionId                       | N/A                 | 55knp39ecqrccyt3-1674464954               |
| Source                              | source                          | N/A                 | duckduckgo                                |
| URL                                 | url                             | dl                  | <https://www.my-website.com/authenticate> |
| Variation ID                        | variationId                     | N/A                 | 1169454                                   |
| Week                                | week                            | N/A                 | 4, 36                                     |
| Year                                | year                            | N/A                 | 2023                                      |

### Metrics list

#### How to read this list?

The metric key is the value you should put in the API's payload.

#### COMMONS

| Metric name | Metric key | Example | Description                     |
| ----------- | ---------- | ------- | ------------------------------- |
| Sessions    | sessions   | 176867  | Total number of sessions        |
| Users       | users      | 100458  | Total number of unique visitors |

#### EVENT

| Metric name   | Metric key   | Example | Description                   |
| ------------- | ------------ | ------- | ----------------------------- |
| Unique Events | uniqueEvents | 33798   | Total number of unique events |
| Total Events  | totalEvents  | 161057  | Total number of events        |

#### PAGEVIEW

| Metric name      | Metric key          | Example     | Description                           |
| ---------------- | ------------------- | ----------- | ------------------------------------- |
| Pages / Session  | pageviewsPerSession | 6.087533786 | Average pageviews per session         |
| Pages / User     | pageviewsPerUser    | 10.71903937 | Average pageviews per unique visitors |
| Pageviews        | pageviews           | 1076556     | Total amount of pageviews             |
| Unique Pageviews | uniquePageviews     | 100434      | Total number of unique pageviews      |

#### TRANSACTION

| Metric name               | Metric key                | Example     | Description                                                                                    |
| ------------------------- | ------------------------- | ----------- | ---------------------------------------------------------------------------------------------- |
| Avg. Item price           | productRevenuePerPurchase | 94.73789751 |                                                                                                |
| Avg. Order Value          | revenuePerTransaction     | 254.58      | Revenue per transaction                                                                        |
| Items per purchase        | itemsPerPurchase          |             |                                                                                                |
| Items quantity            | itemsQuantity             | 11631       | Total amount of items in all ITEM hits. Not to be mixed up with the icn or iq dimension.       |
| Items revenue             | itemsRevenue              | 323529.92   | Total revenue, sum of all itemPrice. Not to be mixed up with the transactionRevenue dimension. |
| Revenue                   | transactionsRevenue       | 1066704.43  | Total revenue, sum of all transactionRevenue. Not to be mixed up with the itemPrice dimension. |
| Revenue per user          | revenuePerUser            | 454.1100213 | Revenue per unique visitor, based on transactionRevenue dimension.                             |
| Shipping                  | transactionsShipping      | 31448.28    | Sum of all transaction shipping revenue                                                        |
| Tax                       | transactionsTax           | 53530.77    | Sum of all transaction tax revenue                                                             |
| Transaction Rate          | transactionRate           |             |                                                                                                |
| Transaction Rate Per User | transactionRatePerUser    | 4.17        | Transaction rate per unique visitor                                                            |
| Transactions              | transactions              | 4190        | Total number of transactions                                                                   |
| Unique Transactions       | uniqueTransactions        | 2349        | Total number of unique transactions                                                            |
| Unique purchases          | uniquePurchases           | 3415        |                                                                                                |

#### NPS

| Metric name    | Metric key    | Example | Description |
| -------------- | ------------- | ------- | ----------- |
| NPS            | nps           |         |             |
| NPS Count      | npsCount      |         |             |
| NPS Detractors | npsDetractors |         |             |
| NPS Passives   | npsPassives   |         |             |
| NPS Promoters  | npsPromoters  |         |             |

#### MISCELLANEOUS

| Metric name                 | Metric key            | Example     | Description                             |
| --------------------------- | --------------------- | ----------- | --------------------------------------- |
| Avg. Session Duration       | avgSessionDuration    | 279.2335857 | Average session duration in seconds     |
| Bounce Rate                 | bounceRate            | 83.16       | Bounce rate (%)                         |
| Bounces                     | bounces               | 4248        | Total bounces                           |
| Ghost                       | ghost                 |             |                                         |
| New Users                   | newUsers              | 68978       | Number of new unique visitors           |
| Number of Sessions per User | sessionsPerUser       | 1.760606423 | Average of sessions per unique visitors |
| Percentage of new sessions  | percentageNewSessions |             |                                         |
| Revisit                     | revisits              | 42402       | Total number of revisits                |
| Sessions duration           | sessionsDuration      |             |                                         |
