# Dimensions and metrics

## Dimensions

The following dimensions can be requested in reports

### General dimensions

| Name                               | Title                                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ---------------------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `type`                             | Activity type                             | See [User activity object](/user-points/user-activities.md#user-activity-object) for a list of all activity types.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `date_time`                        | Date + time                               | The combined value of date and time of the activity in timestamp format                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `channel_id`                       | Channel ID                                | The ID of the channel on which the activity was registered                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `session_duration`                 | Session duration                          | Duration of the session in seconds                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `segment_id`                       | Segment ID                                | <p>IDs of the segments in which the user was when doing the activity.<br><br>Note : querying this dimension can throw an error if date ranges of the query are too big.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `date_yyyymmdd`                    | Date                                      | Date in the `YYYYMMDD` format                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `date_yyyymmddhh`                  | Date + Hour                               | Date in the `YYYYMMDDHH` format                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `date_yyyy_mm_dd`                  | Date                                      | Date in the `YYYY_MM_DD` format                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `date_yyyy_mm_dd_hh_mm`            | Date + Hour + minutes                     | Date in the `YYYY_MM_DD_HH_mm` format                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `has_conversion`                   | Has conversion                            | Boolean. If a `$conversion` event happened during the activity. For more information, see [Predefined event names](/user-points/user-activities.md#predefined-event-names).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `goal_id`                          | Goal ID                                   | IDs of the goals triggered during the activity                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `has_bounced`                      | Has bounced                               | Boolean. If the user only visited one page during the activity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `transaction_amount`               | Transaction amount                        | Amount spent by the user during the activity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `number_of_user_events`            | Number of events                          | <p>Total number of <a href="/pages/-MNSuS1g6Npcklh14qQu#user-events-object">User events</a> the user triggered during the activity. </p><p></p><p>All events (custom and predefined) are counted in this total, except : <code>$conversion</code> <code>$ad\_click</code> <code>$ad\_view</code>  <code>$email\_view</code> <code>$email\_click</code> <code>$email\_sent</code> <code>$email\_delivered</code> <code>$email\_soft\_bounce</code> <code>$email\_hard\_bounce</code> <code>$email\_unsubscribe</code> <code>$email\_complaint</code> <code>$set\_user\_profile\_properties</code> <code>$set\_user\_consent</code> <code>$content\_correction</code> <code>$quit\_while\_running</code> <code>$cleaned\_referrer</code></p> |
| `number_of_ad_views`               | Number of `$ad_view` events               | Total number of [User events](/user-points/user-activities.md#user-events-object) named `$ad_view` during the activity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `number_of_ad_clicks`              | Number of `$ad_click` events              | Total number of [User events](/user-points/user-activities.md#user-events-object) named `$ad_click` during the activity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `number_of_email_views`            | Number of `$email_view` events            | Total number of [User events](/user-points/user-activities.md#user-events-object) named `$email_view` during the activity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `number_of_email_clicks`           | Number of `$email_click` events           | Total number of [User events](/user-points/user-activities.md#user-events-object) named `$email_click` during the activity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `number_of_confirmed_transactions` | Number of `$transaction_confirmed` events | Total number of [User events](/user-points/user-activities.md#user-events-object) named `$transaction_confirmed` during the activity                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

### Event dimensions

You can query dimensions specific to the events that happened during each activity.

{% hint style="info" %}
Only specific predefined events are registered at the moment. See [Event transformations](/data-streams/data-ingestion/activities-analytics.md#event-transformations) to integrate your events in these dimensions.
{% endhint %}

| `event_type` | Event type. Only `$transaction_confirmed` `$item_view` `$list_item_view` `$basket_view` events are stored at the moment |
| ------------ | ----------------------------------------------------------------------------------------------------------------------- |
| `brand`      | Brands of items related to the events                                                                                   |
| `category1`  | Category 1 of items related to the events                                                                               |
| `category2`  | Category 2 of items related to the events                                                                               |
| `category3`  | Category 3 of items related to the events                                                                               |
| `category4`  | Category 4 of items related to the events                                                                               |

### Device dimensions

Informations about the device used during each activity.

| `device_form_factor`     | Type of device  : `PERSONAL_COMPUTER` `SMART_TV` `GAME_CONSOLE` `SMARTPHONE` `TABLET` `WEARABLE_COMPUTER` `OTHE`               |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| `device_os_family`       | OS of the device : `WINDOWS` `MAC_OS` `LINUX` `ANDROID` `IOS` `OTHER`                                                          |
| `device_os_versions`     | Version of the OS, for example `Windows 8` `ios10`                                                                             |
| `device_browser_family`  | Browser used during the activity : `CHROME` `IE` `FIREFOX` `OPERA` `STOCK_ANDROID` `BOT` `EMAIL_CLIENT` `MICROSO_EDGE` `OTHER` |
| `device_browser_version` | Browser's version. For example `10.3.4`, `2.2`                                                                                 |
| `device_brand`           | Device brand. For example `Acer` `Free`                                                                                        |
| `device_model`           | Device model. For example `10 plus` `4K Ultraslim`                                                                             |
| `device_agent_type`      | Agent type : `MOBILE_APP` `WEB_BROWSER`                                                                                        |

### Origin dimensions

The following dimensions are populated by the [Activity origin](/user-points/user-activities.md#activity-origin) :&#x20;

* `origin_campaign_name` / `origin_campaign_technical_name` / `origin_campaign_id`
* `origin_sub_campaign_technical_name` / `origin_sub_campaign_id`
* `origin_message_id` / `origin_message_technical_name`
* `origin_keywords`
* `origin_creative_name` / `origin_creative_technical_name` / `origin_creative_id`
* `origin_engagement_content_id`
* `origin_social_network`
* `origin_referral_path`

### Location dimensions

The following dimensions are populated by the [Activity location](/user-points/user-activities.md#activity-location) :&#x20;

* `location_source`
* `location_country`
* `location_region`
* `location_iso_region`
* `location_city`
* `location_iso_city`
* `location_latitude`
* `location_longitude`

## Metrics

The following metrics can be displayed in reports.

| Name                                       | Title                                        | Description                                                                                                                                                                |
| ------------------------------------------ | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `users`                                    | Active users                                 | The number of distinct active users                                                                                                                                        |
| `sessions`                                 | Activities / Sessions                        | The number of activities / sessions                                                                                                                                        |
| `conversion_rate`                          | Conversion rate                              | Calculated with (Number of activities with conversions / Total number of activities)                                                                                       |
| `avg_number_of_sessions_per_user_point`    | Average number of sessions per UserPoint     | <p>Calculated from the number of sessions and the number of UserPoint.</p><p></p><p><em>Note : this metric cannot be used with other metrics</em></p>                      |
| `avg_revenue_per_user_point`               | Average revenue per UserPoint                | <p>Revenue divided by the number of distinct UserPoint</p><p></p><p><em>Note : this metric cannot be used with other metrics</em></p>                                      |
| `avg_number_of_transactions_per_user_poit` | Average number of transactions per UserPoint | <p>Number of transactions devided by the number of distinct UserPoint</p><p></p><p><em>Note : this metric cannot be used with other metrics</em></p>                       |
| `avg_session_duration`                     | Average session duration                     | Calculated by doing an average of the `session_duration` dimension.                                                                                                        |
| `revenue`                                  | Revenue                                      | Sum of `transaction_amount` dimension                                                                                                                                      |
| `avg_transaction_amount`                   | Average transaction amount per activity      | <p>Sum of <code>transaction\_amount</code> dimension divided by the number of transactions.</p><p></p><p><em>Note : this metric cannot be used with other metrics</em></p> |
| `avg_number_of_user_events`                | Average number of user events per activity   | Sum of `number_of_user_events` dimension divided by the number of activities.                                                                                              |
| `number_of_user_events`                    | Total number of user events                  | Sum of `number_of_user_events` dimension                                                                                                                                   |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.mediarithmics.io/querying-your-data/activities-analytics-queries/dimensions-and-metrics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
