> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ocular.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer Activity

> Website and app analytics in Ocular — sessions, page views, traffic sources, conversion funnel, and user engagement across digital touchpoints.

The unified data model for website and app analytics. Sessions, page views, events, and customer engagement consolidated across every digital touchpoint, with bounce, returning-visitor, and funnel-conversion rates pre-calculated.

## What this data model represents

**Grain:** one row per `user × session × activity`.

**Metrics, grouped by category** — every number you can compute on this data model. Expand below for examples in each.

```mermaid theme={null}
flowchart LR
    R1["Sessions & activity"]:::cat --- S
    R2["Page views & navigation"]:::cat --- S
    R3["Conversion & engagement"]:::cat --- S
    R4["Traffic source"]:::cat --- S

    S(["Metrics"]):::root

    S --- R5["User behaviour"]:::cat
    S --- R6["Active users"]:::cat
    S --- R7["Bounce & exit"]:::cat
    S --- R8["Revenue per session"]:::cat

    classDef root fill:#0f172a,color:#f8fafc,stroke:#0f172a,stroke-width:2px
    classDef cat fill:#2563eb,color:#fff,stroke:#1d4ed8,stroke-width:1.5px
```

<Accordion title="Show sample metrics in each category">
  ```mermaid theme={null}
  flowchart LR
    sa1[Total Sessions]:::leaf --- Sessions["Sessions & activity"]
    sa2[Users]:::leaf --- Sessions
    sa3[Customers]:::leaf --- Sessions

    pv1[Pages per Session]:::leaf --- Pages["Page views & navigation"]
    pv2[Add to Cart Sessions]:::leaf --- Pages
    pv3[Purchase Sessions]:::leaf --- Pages

    ce1[Checkout CVR]:::leaf --- Conv["Conversion & engagement"]
    ce2[Traffic-to-Purchase CVR]:::leaf --- Conv

    ts1[Paid Traffic]:::leaf --- Traffic["Traffic source"]
    ts2[Organic Sessions]:::leaf --- Traffic

    Sessions:::cat --- S
    Pages:::cat --- S
    Conv:::cat --- S
    Traffic:::cat --- S

    S(["Metrics"]):::root

    S --- Behav["User behaviour"]:::cat
    S --- Active["Active users"]:::cat
    S --- Bounce["Bounce & exit"]:::cat
    S --- RevSess["Revenue per session"]:::cat

    Behav --- ub1[Returning Visitors]:::leaf
    Behav --- ub2[Avg Sessions per User]:::leaf

    Active --- au1[DAU]:::leaf
    Active --- au2[WAU]:::leaf
    Active --- au3[MAU]:::leaf

    Bounce --- bo1[Bounce Rate]:::leaf
    Bounce --- bo2[Bounced Sessions]:::leaf

    RevSess --- rs1[Net Sales per Session]:::leaf
    RevSess --- rs2[Gross Sales per Session]:::leaf

    classDef root fill:#0f172a,color:#f8fafc,stroke:#0f172a,stroke-width:2px
    classDef cat fill:#2563eb,color:#fff,stroke:#1d4ed8,stroke-width:1.5px
    classDef leaf fill:#eff6ff,color:#1e3a8a,stroke:#bfdbfe,stroke-width:1px
  ```
</Accordion>

**Dimensions, grouped by category** — every way you can split, filter, or group those metrics. Expand below for examples in each.

```mermaid theme={null}
flowchart LR
    D1["User identity"]:::cat --- M
    D2["Session & activity"]:::cat --- M
    D3["Traffic source"]:::cat --- M
    D4["Page & content"]:::cat --- M
    D5[Product]:::cat --- M

    M(["Dimensions"]):::root

    M --- D6[Device]:::cat
    M --- D7[Geographic]:::cat
    M --- D8[Time]:::cat
    M --- D9["User journey"]:::cat
    M --- D10[Technical]:::cat

    classDef root fill:#0f172a,color:#f8fafc,stroke:#0f172a,stroke-width:2px
    classDef cat fill:#9333ea,color:#fff,stroke:#7e22ce,stroke-width:1.5px
```

<Accordion title="Show sample dimensions in each category">
  ```mermaid theme={null}
  flowchart LR
    ui1[user_id]:::leaf --- UI["User identity"]
    ui2[customer_id]:::leaf --- UI

    sa1[session_id]:::leaf --- SA["Session & activity"]
    sa2[activity_name]:::leaf --- SA

    ts1[source]:::leaf --- TS["Traffic source"]
    ts2[medium]:::leaf --- TS
    ts3[channel_grouping]:::leaf --- TS

    pc1[page_location]:::leaf --- PC["Page & content"]
    pc2[page_title]:::leaf --- PC

    pr1[product_name]:::leaf --- Pr[Product]
    pr2[product_category]:::leaf --- Pr

    UI:::cat --- M
    SA:::cat --- M
    TS:::cat --- M
    PC:::cat --- M
    Pr:::cat --- M

    M(["Dimensions"]):::root

    M --- Dv[Device]:::cat
    M --- Geo[Geographic]:::cat
    M --- Ti[Time]:::cat
    M --- UJ["User journey"]:::cat
    M --- Tch[Technical]:::cat

    Dv --- dv1[device_category]:::leaf
    Dv --- dv2[device_operating_system]:::leaf

    Geo --- g1[city]:::leaf
    Geo --- g2[country]:::leaf

    Ti --- t1[full_date]:::leaf
    Ti --- t2[day_name]:::leaf

    UJ --- uj1[days_since_last_activity]:::leaf

    Tch --- tc1[platform]:::leaf
    Tch --- tc2[stream_id]:::leaf

    classDef root fill:#0f172a,color:#f8fafc,stroke:#0f172a,stroke-width:2px
    classDef cat fill:#9333ea,color:#fff,stroke:#7e22ce,stroke-width:1.5px
    classDef leaf fill:#faf5ff,color:#581c87,stroke:#e9d5ff,stroke-width:1px
  ```
</Accordion>

**Source:** Google Analytics 4, customer activity streams, device + geo enrichment, and product-interaction events, refreshed daily.

**What's special:** session-based and identity-resolved metrics are pre-aggregated. Bounce Rate accounts for single-activity sessions, Returning Visitor % tracks multi-session users, and funnel CVRs map the full View → Cart → Checkout → Purchase path. Metrics like Pages per Session and Traffic-to-Purchase CVR stay accurate at any time grain and across any dimension — you don't have to re-derive them per query.

## Slice by

Every dimension you can group or filter by.

| Dimension                              | Description                                      |
| -------------------------------------- | ------------------------------------------------ |
| **User identity**                      |                                                  |
| `user_id`                              | Unique identifier for authenticated users        |
| `user_pseudo_id`                       | Pseudo identifier for anonymous visitors         |
| `is_customer_flag`                     | Boolean — user is an identified customer         |
| `customer_id`                          | Unique customer identifier for transacting users |
| **Session & activity**                 |                                                  |
| `session_id`                           | Unique session identifier                        |
| `activity_timestamp`                   | When the activity occurred                       |
| `activity_name`                        | Name of the activity / event                     |
| `session_count_per_user`               | Number of sessions for this user                 |
| `activity_count_per_session`           | Number of activities within this session         |
| **Traffic source**                     |                                                  |
| `source`                               | Traffic source (google, facebook, direct, …)     |
| `medium`                               | Marketing medium (organic, cpc, referral, …)     |
| `channel_grouping`                     | Grouped channel classification                   |
| `campaign_id`                          | Marketing campaign identifier                    |
| `campaign_name`                        | Marketing campaign name                          |
| `content`                              | Ad content or creative identifier                |
| `term`                                 | Search term / keyword from paid campaigns        |
| **Page & content**                     |                                                  |
| `page_location`                        | Full URL of the page                             |
| `page_view_path`                       | Path portion of the page URL                     |
| `page_title`                           | Title of the page                                |
| `collection`                           | Product collection identifier                    |
| `search_term`                          | Internal site-search query                       |
| **Product**                            |                                                  |
| `product_variant_id`                   | Product variant identifier                       |
| `product_name`                         | Product name                                     |
| `product_category`                     | High-level product category                      |
| `product_subcategory`                  | Product subcategory                              |
| `product_color`                        | Color variant                                    |
| **Device**                             |                                                  |
| `device_category`                      | Desktop, mobile, tablet                          |
| `device_operating_system`              | OS of the device                                 |
| `device_browser`                       | Browser used                                     |
| `device_mobile_brand_name`             | Mobile device brand                              |
| `device_mobile_model_name`             | Mobile device model                              |
| **Geographic**                         |                                                  |
| `city`                                 | City of the user                                 |
| `region`                               | State or region                                  |
| `country`                              | Country                                          |
| `sub_continent`                        | Sub-continental region                           |
| `continent`                            | Continent                                        |
| **Time**                               |                                                  |
| `full_date`                            | Date, time component stripped                    |
| `full_timestamp`                       | Full timestamp                                   |
| `day_name`                             | Monday, Tuesday, …                               |
| `type_of_day`                          | Weekday / Weekend                                |
| **User journey**                       |                                                  |
| `first_activity_timestamp`             | First-ever activity for this user                |
| `last_activity_timestamp_for_activity` | Most recent activity for this user               |
| `days_since_last_activity`             | Days since previous activity                     |
| `time_to_activity`                     | Days from first to current activity              |
| **Technical**                          |                                                  |
| `order_id`                             | Order identifier for purchase events             |
| `stream_id`                            | Data-stream identifier                           |
| `platform`                             | Web, app, …                                      |

## Use it to answer

* What's our true conversion rate from session to purchase, and where in the funnel are we losing people?
* Which traffic sources and channels drive the highest-quality visitors — by engagement, not just volume?
* How do mobile vs. desktop users behave differently — pages per session, add-to-cart rate, checkout CVR?
* What's the bounce rate by landing page or campaign, and which pages need work?
* How many of our visitors are returning, and what's the DAU/WAU/MAU stickiness ratio?
* Which geographic regions show the strongest engagement and conversion?
* Which products get viewed often but rarely added to cart — a PDP or pricing problem?
* What share of sessions come from paid vs. organic vs. referral, and how does each convert?

## Available metrics

Everything you can compute on this data model.

| Metric                       | Formula                                                       |
| ---------------------------- | ------------------------------------------------------------- |
| **Sessions & activity**      |                                                               |
| Web Traffic (Sessions)       | Count of unique website sessions                              |
| Customer Sessions            | Count of sessions by identified customers                     |
| Total Sessions               | Count of all sessions regardless of activity type             |
| Users                        | Count of unique identified users                              |
| Pseudo Users                 | Count of unique anonymous visitors                            |
| Customers (Transacting)      | Count of unique customers with transactions                   |
| Total Activities             | Count of activities across all sessions                       |
| **Page views & navigation**  |                                                               |
| Page View Sessions           | Sessions containing at least one page view                    |
| Page View Activities         | Count of individual page-view events                          |
| Pages per Session            | Avg page views per session                                    |
| View Item Sessions           | Sessions with a product detail page view                      |
| Add to Cart Sessions         | Sessions where items were added to cart                       |
| Checkout Sessions            | Sessions that reached checkout                                |
| Purchase Sessions            | Sessions that completed a purchase                            |
| Referral Sessions            | Sessions from referral sources                                |
| Paid Sessions                | Sessions from paid advertising                                |
| **Conversion & engagement**  |                                                               |
| Visits per Customer          | Avg sessions per identified customer                          |
| % PLP Sessions               | Sessions viewing product-listing pages ÷ Total Sessions × 100 |
| % PDP Sessions               | Sessions viewing product-detail pages ÷ Total Sessions × 100  |
| % Sessions Adding to Cart    | Add to Cart Sessions ÷ Total Sessions × 100                   |
| Checkout CVR                 | Purchase Sessions ÷ Checkout Sessions × 100                   |
| Traffic-to-Purchase CVR      | Purchase Sessions ÷ Total Sessions × 100                      |
| **Traffic source**           |                                                               |
| Referral Traffic             | Count of sessions from referral sources                       |
| Paid Traffic                 | Count of sessions from paid channels                          |
| Organic Sessions             | Count of sessions from organic search                         |
| **User behaviour**           |                                                               |
| Avg Sessions per User        | Total Sessions ÷ Pseudo Users                                 |
| Returning Visitors           | Users with more than one session                              |
| % Returning Visitors         | Returning Visitors ÷ Pseudo Users × 100                       |
| Return Sessions              | Sessions from returning visitors                              |
| Return Visit Rate            | Return Sessions ÷ Total Sessions × 100                        |
| Avg Activities per Session   | Total Activities ÷ Total Sessions                             |
| Avg Activities per User      | Total Activities ÷ Pseudo Users                               |
| Avg Days Since Last Activity | Avg(days between consecutive activities per user)             |
| Avg Time to Activity         | Avg(days from first to last activity per user)                |
| **Active users**             |                                                               |
| DAU                          | Unique users active in the last 1 day                         |
| WAU                          | Unique users active in the last 7 days                        |
| MAU                          | Unique users active in the last 30 days                       |
| DAU / WAU                    | DAU ÷ WAU                                                     |
| DAU / MAU                    | DAU ÷ MAU                                                     |
| WAU / MAU                    | WAU ÷ MAU                                                     |
| **Bounce & exit**            |                                                               |
| Bounced Sessions             | Sessions with only one activity                               |
| Bounce Rate                  | Bounced Sessions ÷ Total Sessions × 100                       |
| **Revenue per session**      |                                                               |
| Gross Sales per Session      | Gross Revenue ÷ Total Sessions                                |
| Net Sales per Session        | Net Revenue ÷ Total Sessions                                  |

## Not available in this data model

If you need order-level revenue, fulfilment, or ad-platform metrics, query a different data model.

| Looking for…                                                                                               | Use                                                                                         |
| ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| Net Revenue, AOV, gross/net order counts, returns, cancellations, discount uplift, Customer Lifetime Value | [Sales](/data-models/sales)                                                                 |
| Shipment status, delivery SLA, RTO rate, return-pipeline timing                                            | [Fulfilment](/data-models/fulfilment)                                                       |
| Ad spend, ROAS, CPA, impressions, clicks by campaign / adset / ad                                          | [Meta Ads](/data-models/meta-ads/overview) · [Google Ads](/data-models/google-ads/overview) |
