---
title: sessions
description: >-
  Reference for the ShopifyQL `sessions` table. Every metric and dimension,
  paired with worked example queries.
api_version: 2026-07
source_url:
  html: >-
    https://shopify.dev/docs/api/shopifyql/latest/schemas/sessions_and_behavior/sessions
  md: >-
    https://shopify.dev/docs/api/shopifyql/latest/schemas/sessions_and_behavior/sessions.md
api_name: shopifyql
---

# sessions

The `sessions` [schema](https://shopify.dev/docs/api/shopifyql/latest/schemas) captures online store sessions, with one row per session. Use it to report on storefront behavior, traffic, engagement, devices, geography, and the conversion funnel.

### Use cases

* **Traffic by geography**: Group [`sessions`](#sessionsmetric-propertydetail-sessions) and [`online_store_visitors`](#sessionsmetric-propertydetail-onlinestorevisitors) by [`session_country`](#sessionsdimension-propertydetail-sessioncountry) or [`session_region`](#sessionsdimension-propertydetail-sessionregion) to break traffic and distinct visitors down by location.
* **Engagement**: Show [`pageviews`](#sessionsmetric-propertydetail-pageviews), [`pageviews_per_session`](#sessionsmetric-propertydetail-pageviewspersession), and [`average_session_duration`](#sessionsmetric-propertydetail-averagesessionduration) together to gauge how deeply visitors engage with the store.
* **Closed funnel**: Use [`sessions_with_cart_additions`](#sessionsmetric-propertydetail-sessionswithcartadditions), [`sessions_that_reached_checkout`](#sessionsmetric-propertydetail-sessionsthatreachedcheckout), and [`sessions_that_completed_checkout`](#sessionsmetric-propertydetail-sessionsthatcompletedcheckout) to trace where sessions drop out of the purchase funnel.
* **Conversion breakdown**: Break down [`bounce_rate`](#sessionsmetric-propertydetail-bouncerate) or [`conversion_rate`](#sessionsmetric-propertydetail-conversionrate) by [`session_device_browser`](#sessionsdimension-propertydetail-sessiondevicebrowser), [`session_device_os`](#sessionsdimension-propertydetail-sessiondeviceos), or [`session_api_client`](#sessionsdimension-propertydetail-sessionapiclient) to see which devices and clients convert best.

Examples

### Examples

* ####

  ##### Description

  Track the session-to-checkout funnel day by day this month, against the prior period. This example uses \[\`WHERE\`]\(/docs/api/shopifyql/latest/syntax/where) \`human\_or\_bot\_session = 'human'\` to filter out bots.

  ##### ShopifyQL

  ```shopifyql
  FROM sessions
    SHOW sessions, online_store_visitors, sessions_with_cart_additions,
      sessions_that_reached_checkout, sessions_that_completed_checkout,
      conversion_rate
    WHERE human_or_bot_session = 'human'
    TIMESERIES day WITH PERCENT_CHANGE
    DURING this_month
    COMPARE TO previous_period
    ORDER BY day ASC
  VISUALIZE sessions, conversion_rate TYPE line
  ```

* ####

  ##### Description

  Rank the top 50 referrer-and-device pairs by \`sessions\_that\_completed\_checkout\` since the start of last year. This example uses \[\`GROUP\_TOTALS\`]\(/docs/api/shopifyql/latest/syntax/with#group-total-columns) to subtotal each referrer across its devices.

  ##### ShopifyQL

  ```shopifyql
  FROM sessions
    SHOW sessions, conversion_rate, sessions_that_completed_checkout,
      average_session_duration
    GROUP BY referrer_source, session_device_type WITH TOTALS, GROUP_TOTALS
    HAVING sessions > 100
    SINCE last_year UNTIL today
    ORDER BY sessions_that_completed_checkout DESC
    LIMIT 50
  VISUALIZE sessions_that_completed_checkout TYPE stacked_horizontal_bar
  ```

* ####

  ##### Description

  Track daily \`pageviews\` for human sessions, with \`pageviews\_per\_session\` and \`bounces\`, last month. This example uses \[\`WHERE\`]\(/docs/api/shopifyql/latest/syntax/where) \`human\_or\_bot\_session = 'human'\` to exclude bot traffic.

  ##### ShopifyQL

  ```shopifyql
  FROM sessions
    SHOW pageviews, pageviews_per_session, bounces
    WHERE human_or_bot_session = 'human'
    TIMESERIES day
    DURING last_month
    ORDER BY day ASC
  VISUALIZE pageviews TYPE line
  ```

* ####

  ##### Description

  Rank \`average\_session\_duration\` by \`session\_device\_type\` last month. This example uses \[\`GROUP BY\`]\(/docs/api/shopifyql/latest/syntax/group-by) \`session\_device\_type\` to split session duration across device types.

  ##### ShopifyQL

  ```shopifyql
  FROM sessions
    SHOW average_session_duration
    GROUP BY session_device_type WITH TOTALS
    DURING last_month
    ORDER BY average_session_duration DESC
    LIMIT 10
  VISUALIZE average_session_duration TYPE horizontal_bar
  ```

***

## Metrics

Counts and calculations that let you track key business indicators. Metrics show up as the columns when queried.

Metrics you can use when querying `FROM sessions`.

* **added\_​to\_​cart\_​rate**

  **PERCENT**

  The share of online store visits where a visitor added at least one item to the cart.

  `Added to cart rate = sessions with cart additions / sessions`

* **average\_​session\_​duration**

  **SECOND\_DURATION**

  Average duration, in seconds, of online store visits

* **bounce\_​rate**

  **PERCENT**

  Percentage of online store visits that ended after a single pageview

  `Bounce rate = bounces / sessions`

* **bounces**

  **INTEGER**

  Online store visits that ended after a single pageview

* **checkout\_​conversion\_​rate**

  **PERCENT**

  For visits that reached checkout, the share that completed a purchase.

  `Checkout conversion rate = sessions that completed checkout / sessions that reached checkout`

* **completed\_​checkout\_​rate**

  **PERCENT**

  For visits where a visitor added items to cart and reached checkout, the share that completed a purchase.

  `Completed checkout rate = sessions with cart additions that reached checkout and completed checkout / sessions with cart additions that reached checkout`

* **conversion\_​rate**

  **PERCENT**

  Percentage of online store visits (sessions) that resulted in a sale

  `Conversion rate = sessions that completed checkout / sessions`

* **online\_​store\_​visitors**

  **INTEGER**

  The number of unique visitors to your online store. A visitor might have multiple sessions.

* **pageviews**

  **INTEGER**

  Total pageviews across all online store visits

* **pageviews\_​per\_​session**

  **DECIMAL**

  Average number of pageviews per online store visit

  `Pageviews per session = pageviews / sessions`

* **reached\_​checkout\_​rate**

  **PERCENT**

  Online store visits that reached checkout relative to total visits

  `Reached checkout rate = sessions that reached checkout / sessions`

* **sessions**

  **INTEGER**

  Number of online store visits

* **sessions\_​that\_​completed\_​checkout**

  **INTEGER**

  Online store visits in which a purchase was completed

* **sessions\_​that\_​reached\_​and\_​completed\_​checkout**

  **INTEGER**

  Online store visits in which the checkout page was reached, then purchase was completed

* **sessions\_​that\_​reached\_​checkout**

  **INTEGER**

  Online store visits in which the checkout page was reached

* **sessions\_​with\_​cart\_​additions**

  **INTEGER**

  Online store visits in which a visitor added an item to cart

### PERCENT

A percentage value represented as a decimal, where 0.25 represents 25%.

```ts
```

### SECOND\_DURATION

A duration measured in seconds.

```ts
```

### INTEGER

A whole number without decimal places, used for counts, quantities, and other discrete numeric values.

```ts
```

### DECIMAL

A precise decimal number used for calculations where fixed-point precision matters.

```ts
```

***

## Dimensions

Attributes of your data that let you look more granularly at aspects of the data. Group and filter by dimensions to shape the rows your query returns.

Dimensions you can use when querying `FROM sessions`.

* **customer\_​id**

  **IDENTITY**

  The unique Shopify identifier for the customer associated with the online store visit. Use [`customer_id`](#sessionsdimension-propertydetail-customerid) to break results down by customer, or use it with [`customer_name`](#sessionsdimension-propertydetail-customername) or [`customer_email`](#sessionsdimension-propertydetail-customeremail) to show readable labels.

* **day**

  **DAY\_TIMESTAMP**

  The day an online store visit started.

* **day\_​of\_​week**

  **DAY\_OF\_WEEK**

  The day of the week an online store visit started, with values Monday through Sunday.

* **hour**

  **HOUR\_TIMESTAMP**

  The hour an online store visit started.

* **hour\_​of\_​day**

  **HOUR\_OF\_DAY**

  The hour of day an online store visit started, with values 0 through 23.

* **human\_​or\_​bot\_​session**

  **STRING**

  Whether an online store visit comes from a human visitor (Human) or an automated bot (Bot).

* **landing\_​page\_​path**

  **STRING**

  Values contain only the page path, such as `/products/shirt`, and the homepage appears as `/`.

* **landing\_​page\_​type**

  **STRING**

  The type of page a visitor first landed on, such as a product page, collection page, or homepage.

* **landing\_​page\_​url**

  **STRING**

  Values include the domain and page path for the page where the visit begins.

* **minute**

  **MINUTE\_TIMESTAMP**

  The minute an online store visit started.

* **month**

  **MONTH\_TIMESTAMP**

  The month an online store visit started.

* **month\_​of\_​year**

  **MONTH\_OF\_YEAR**

  The month of the year an online store visit started, with values 1 through 12.

* **quarter**

  **QUARTER\_TIMESTAMP**

  The quarter an online store visit started.

* **referrer\_​domain**

  **STRING**

  Values are referring site domains such as google.com, facebook.com, or pinterest.com.

* **referrer\_​name**

  **STRING**

  Name of the site that led to the online store visit

* **referrer\_​path**

  **STRING**

  The page path on the external site that sent the visitor to your online store. Use [`referrer_path`](#sessionsdimension-propertydetail-referrerpath) to inspect which pages on a referrer drove visits.

* **referrer\_​site**

  **STRING**

  Site that led to the online store visit

* **referrer\_​source**

  **STRING**

  Referrer type that led to the online store visit (organic, email, etc.)

* **referrer\_​terms**

  **STRING**

  The search terms from the external search referral that led to the visit, when available. Use [`referrer_terms`](#sessionsdimension-propertydetail-referrerterms) to see which free-text queries brought visitors to your store.

* **referrer\_​url**

  **STRING**

  The external page that sent the visitor to your online store. The same referring page groups together regardless of query parameters.

* **rollout\_​ids**

  **ARRAY\<INTEGER>**

  A session might include more than one rollout ID when the visitor is exposed to multiple active rollouts.

* **rollout\_​treatment\_​ids**

  **ARRAY\<INTEGER>**

  A session might include more than one rollout treatment ID when the visitor is exposed to multiple active treatments.

* **second**

  **SECOND\_TIMESTAMP**

  The second an online store visit started.

* **session\_​api\_​client**

  **STRING**

  The storefront client used for the online store visit, such as Hydrogen, headless, or Online Store.

* **session\_​bounced**

  **BOOLEAN**

  Values are `true` when the online store visit ended after a single pageview and `false` when it continued past the first pageview.

* **session\_​city**

  **STRING**

  City from which a visitor browsed your online store

* **session\_​country**

  **STRING**

  Country from which a visitor browsed your online store

* **session\_​country\_​code**

  **STRING**

  Country code of the country from which a visitor browsed your online store

* **session\_​device\_​browser**

  **STRING**

  Browser used to visit your online store

* **session\_​device\_​browser\_​version**

  **STRING**

  Version number of the browser used to visit your online store

* **session\_​device\_​os**

  **STRING**

  Operating system of the device used for visiting your online store

* **session\_​device\_​os\_​version**

  **STRING**

  Operating system version of the visitor's device

* **session\_​device\_​type**

  **STRING**

  The kind of device a visitor uses to browse your store, such as Desktop, Mobile, Tablet, or Smart TV.

* **session\_​duration**

  **INTEGER**

  Duration, in seconds, of the online store visit

* **session\_​id**

  **STRING**

  Shopify identifier for a visit to your online store

* **session\_​region**

  **STRING**

  State or province from which a visitor browsed your online store (e.g., California, Ontario)

* **shop\_​id**

  **IDENTITY**

  The unique Shopify identifier for your store. Use [`shop_id`](#sessionsdimension-propertydetail-shopid) with [`shop_name`](#sessionsdimension-propertydetail-shopname) to show readable store labels.

* **utm\_​campaign**

  **STRING**

  The UTM campaign value on the link that led to the online store visit. Values are the campaign names you use in your tracking links. Use [`utm_campaign`](#sessionsdimension-propertydetail-utmcampaign) to compare traffic from specific campaigns.

* **utm\_​content**

  **STRING**

  The UTM content value on the link that led to the online store visit. Values are the content labels you set in tracking links, often used to distinguish ads, links, or creatives. Use [`utm_content`](#sessionsdimension-propertydetail-utmcontent) to compare campaign variants.

* **utm\_​medium**

  **STRING**

  The UTM medium value on the link associated with the online store visit. Values are the medium labels you set, such as email, social, or cpc. Use [`utm_medium`](#sessionsdimension-propertydetail-utmmedium) to compare traffic by marketing medium.

* **utm\_​source**

  **STRING**

  The UTM source value on the link that led to the online store visit. Values are the source labels you set, such as google, newsletter, or instagram. Use [`utm_source`](#sessionsdimension-propertydetail-utmsource) to compare traffic by source.

* **utm\_​term**

  **STRING**

  The UTM term value on the link that led to the online store visit. Values are the term labels you set, often used for keywords or audience terms. Use [`utm_term`](#sessionsdimension-propertydetail-utmterm) to compare traffic by tracked term.

* **week**

  **WEEK\_TIMESTAMP**

  The week an online store visit started.

* **week\_​of\_​year**

  **WEEK\_OF\_YEAR**

  The week of the year an online store visit started, with values 1 through 53.

* **year**

  **YEAR\_TIMESTAMP**

  The year an online store visit started.

* **abandoned\_​checkout\_​date**

  **DAY\_TIMESTAMP**

  Date the customer most recently abandoned a cart

* **customer\_​account\_​status**

  **STRING**

  The customer's account state, with values Declined, Disabled, Enabled, and Invited.

* **customer\_​added\_​date**

  **DAY\_TIMESTAMP**

  The day the customer record was added, reported in your store's time zone.

* **customer\_​created\_​by\_​app\_​id**

  **IDENTITY**

  The Shopify identifier for the app that created the customer.

* **customer\_​email**

  **STRING**

  Email address of the customer

* **customer\_​email\_​domain**

  **STRING**

  The part of the customer's email address after the @ symbol, such as gmail.com or your company's domain.

* **customer\_​language**

  **STRING**

  Language associated with the customer

* **customer\_​name**

  **STRING**

  Full name of the customer

* **shop\_​name**

  **STRING**

  Name of your store

* **customer\_​email\_​subscription\_​status**

  **STRING**

  The customer's email marketing subscription state, with values such as Invalid, Not subscribed, Pending, and Subscribed.

* **customer\_​cities**

  **ARRAY\<STRING>**

  All cities in the customer's history of addresses

* **customer\_​countries**

  **ARRAY\<STRING>**

  All countries from the customer's address history. Values are country codes such as US, CA, GB, and AU.

* **customer\_​regions**

  **ARRAY\<STRING>**

  All states or provinces from the customer's address history. Values are region codes such as US-CA, US-NY, CA-ON, and GB-ENG.

* **customer\_​amount\_​spent**

  **MONEY**

  The customer's all-time spend is shown in your store's currency.

* **customer\_​last\_​order\_​date**

  **DAY\_TIMESTAMP**

  The day the customer most recently placed an order, reported in your store's time zone.

* **customer\_​number\_​of\_​orders**

  **INTEGER**

  Number of orders the customer has placed across all time

* **first\_​order\_​sales\_​channel**

  **STRING**

  The sales channel where the customer's first order was placed, shown as a channel name such as Online Store or POS.

* **customer\_​cohort\_​month**

  **MONTH\_TIMESTAMP**

  The month of the customer's first order, reported in your store's time zone.

* **customer\_​cohort\_​quarter**

  **QUARTER\_TIMESTAMP**

  The quarter of the customer's first order, reported in your store's time zone.

* **customer\_​cohort\_​week**

  **WEEK\_TIMESTAMP**

  The week of the customer's first order, reported in your store's time zone.

* **customer\_​first\_​order\_​date**

  **DAY\_TIMESTAMP**

  The day the customer placed their first order, reported in your store's time zone.

* **predicted\_​spend\_​tier**

  **STRING**

  The customer's predicted spend tier for the next year, with values Low, Medium, and High.

* **customer\_​sms\_​subscription\_​status**

  **STRING**

  The customer's SMS marketing subscription state, with values such as Not subscribed, Pending, Redacted, and Subscribed.

* **customer\_​tag**

  **STRING**

  Tag associated with the customer

* **customer\_​tags**

  **ARRAY\<STRING>**

  Set of tags associated with the customer

* **rfm\_​group**

  **STRING**

  A customer relationship label based on recency, frequency, and monetary spend. Values include Champions, Loyal, Needs attention, and At risk.

* **agentic\_​referring\_​channel**

  **STRING**

  The AI agent or assistant that referred the session to your online store, with values ChatGPT, Google AI Mode and Gemini, Microsoft Copilot, and Shop.

* **referring\_​channel**

  **STRING**

  Channel that led to an online store session

* **referring\_​medium**

  **STRING**

  The category of referring channel that led to an online store session, such as email, social, search, or affiliate.

* **referring\_​platform**

  **STRING**

  Platform that led to an online store session

* **traffic\_​type**

  **STRING**

  The type of traffic that led to an online store session, with values Direct, Paid, Organic, Unknown, and Unattributed.

* **channel\_​handle**

  **STRING**

  Name of the marketing channel or platform that drove the marketing engagement

* **created\_​at**

  **TIMESTAMP**

  Date and time the marketing activity was created

* **ended\_​at**

  **TIMESTAMP**

  Date and time the marketing activity ended

* **manage\_​url**

  **STRING**

  URL for managing the marketing activity in the external marketing platform

* **marketing\_​activity\_​channel**

  **STRING**

  The marketing channel category for the activity, such as social media, email, or search.

* **marketing\_​activity\_​id**

  **IDENTITY**

  The unique Shopify identifier for the marketing activity. Use [`marketing_activity_id`](#sessionsdimension-propertydetail-marketingactivityid) with [`marketing_activity_title`](#sessionsdimension-propertydetail-marketingactivitytitle) to show readable activity labels.

* **marketing\_​activity\_​status**

  **STRING**

  Current status of the marketing activity (such as Active or Paused)

* **marketing\_​activity\_​title**

  **STRING**

  Name of the marketing activity

* **marketing\_​api\_​client**

  **IDENTITY**

  Unique identifier Shopify uses for the API client

* **marketing\_​automation\_​id**

  **IDENTITY**

  Unique ID that Shopify uses to identify the marketing automation

* **marketing\_​budget**

  **MONEY**

  The budget allocated to the marketing activity, in your store's currency.

* **marketing\_​budget\_​type**

  **STRING**

  The type of budget allocated to the marketing activity, such as daily, lifetime, or monthly.

* **marketing\_​delivery\_​channel**

  **STRING**

  Channel through which the marketing activity is delivered

* **marketing\_​event\_​id**

  **IDENTITY**

  Unique number for the marketing event in Shopify's system

* **marketing\_​platform**

  **STRING**

  The marketing platform that created the marketing activity, shown as a platform name.

* **preview\_​url**

  **STRING**

  URL for previewing the marketing activity

* **remote\_​id**

  **STRING**

  External identifier of the marketing activity on the marketing channel

* **scheduled\_​to\_​end\_​at**

  **TIMESTAMP**

  Date and time the marketing activity is scheduled to end

* **started\_​at**

  **TIMESTAMP**

  Date and time the marketing activity became active

* **rollout\_​id**

  **IDENTITY**

  Unique identifier for the rollout that was exposed to the buyer in the session

* **rollout\_​treatment\_​id**

  **IDENTITY**

  Unique identifier for the specific treatment exposed to the session

### IDENTITY

A unique identifier for a Shopify resource such as a customer, product, or order.

```ts
```

### DAY\_TIMESTAMP

A date value truncated to day precision.

```ts
```

### DAY\_OF\_WEEK

A day within a week, used for weekday-based grouping and filtering.

```ts
```

### HOUR\_TIMESTAMP

A timestamp truncated to hour precision.

```ts
```

### HOUR\_OF\_DAY

An hour within a day, typically represented as an integer from 0 to 23.

```ts
```

### STRING

A sequence of characters representing text data.

```ts
```

### MINUTE\_TIMESTAMP

A timestamp truncated to minute precision.

```ts
```

### MONTH\_TIMESTAMP

A date value representing the start of a month.

```ts
```

### MONTH\_OF\_YEAR

A month number within a year.

```ts
```

### QUARTER\_TIMESTAMP

A date value representing the start of a fiscal quarter.

```ts
```

### ARRAY

A list of values. The element type appears inside angle brackets, such as ARRAY\<STRING>.

```ts
```

### SECOND\_TIMESTAMP

A timestamp truncated to second precision.

```ts
```

### BOOLEAN

A true or false value representing binary states.

```ts
```

### WEEK\_TIMESTAMP

A date value representing the start of a week.

```ts
```

### WEEK\_OF\_YEAR

A week number within a year.

```ts
```

### YEAR\_TIMESTAMP

A date value representing the start of a year.

```ts
```

### MONEY

A monetary amount representing currency values such as prices, revenue, costs, and discounts.

```ts
```

### TIMESTAMP

A full-precision timestamp including date and time.

```ts
```

***

## MATCHES expressions

Use these expressions inside a [`MATCHES`](https://shopify.dev/docs/api/shopifyql/latest/syntax/where#matches) filter to keep `sessions` rows that have at least one related record matching the parameters. Each parameter filters on a dimension or metric of the related records.

* **customer.​orders\_​placed**

  **SessionsCustomerOrdersPlacedConditions**

  Orders the customer placed, filterable by order date, source app, location, order count, and spend.

* **customer.​products\_​purchased**

  **SessionsCustomerProductsPurchasedConditions**

  Products the customer bought, filterable by product ID, purchase date, quantity per order, and total quantity.

* **customer.​shopify\_​email.​bounced**

  **SessionsCustomerShopifyEmailBouncedConditions**

  Emails that bounced for the customer, filterable by marketing activity, bounce date, and bounce count.

* **customer.​shopify\_​email.​clicked**

  **SessionsCustomerShopifyEmailClickedConditions**

  Emails the customer clicked, filterable by marketing activity, click date, and click count.

* **customer.​shopify\_​email.​delivered**

  **SessionsCustomerShopifyEmailDeliveredConditions**

  Emails delivered to the customer, filterable by marketing activity, delivery date, and delivery count.

* **customer.​shopify\_​email.​marked\_​as\_​spam**

  **SessionsCustomerShopifyEmailMarkedAsSpamConditions**

  Emails the customer marked as spam, filterable by marketing activity, spam-report date, and spam-report count.

* **customer.​shopify\_​email.​opened**

  **SessionsCustomerShopifyEmailOpenedConditions**

  Emails the customer opened, filterable by marketing activity, open date, and open count.

* **customer.​shopify\_​email.​unsubscribed**

  **SessionsCustomerShopifyEmailUnsubscribedConditions**

  Email unsubscribe events for the customer, filterable by marketing activity, unsubscribe date, and unsubscribe count.

* **customer.​store\_​credit\_​accounts**

  **SessionsCustomerStoreCreditAccountsConditions**

  Store credit accounts for the customer, filterable by balance, currency, expiry date, and most recent credit date.

* **customer.​storefront\_​event.​collection\_​viewed**

  **SessionsCustomerStorefrontEventCollectionViewedConditions**

  Collection pages the customer viewed, filterable by collection ID, view date, and view count.

* **customer.​storefront\_​event.​product\_​viewed**

  **SessionsCustomerStorefrontEventProductViewedConditions**

  Product pages the customer viewed, filterable by product ID, view date, and view count.

* **customer.​within\_​distance**

  **SessionsCustomerWithinDistanceConditions**

  Customers with an address within a distance of a location, filterable by coordinates and radius.

### SessionsCustomerOrdersPlacedConditions

Fields you can use inside \`customer.orders\_placed MATCHES (...)\` when querying \`FROM sessions\`.

* amount

  Filter. Amount spent per order.

  ```ts
  MONEY
  ```

* app\_id

  Filter. App ID associated with the order.

  ```ts
  IDENTITY
  ```

* date

  Filter. Date the order was placed.

  ```ts
  TIMESTAMP
  ```

* location\_id

  Filter. Location ID associated with the order.

  ```ts
  IDENTITY
  ```

* count

  Metric. Number of orders placed.

  ```ts
  INTEGER
  ```

* sum\_amount

  Metric. Amount spent in the date range.

  ```ts
  MONEY
  ```

### SessionsCustomerProductsPurchasedConditions

Fields you can use inside \`customer.products\_purchased MATCHES (...)\` when querying \`FROM sessions\`.

* date

  Filter. Date the product(s) were purchased.

  ```ts
  TIMESTAMP
  ```

* id

  Filter. Product IDs.

  ```ts
  IDENTITY
  ```

* quantity

  Filter. Number purchased per order.

  ```ts
  INTEGER
  ```

* sum\_quantity

  Metric. Number purchased within the date range.

  ```ts
  INTEGER
  ```

### SessionsCustomerShopifyEmailBouncedConditions

Fields you can use inside \`customer.shopify\_email.bounced MATCHES (...)\` when querying \`FROM sessions\`.

* activity\_id

  Filter. Marketing activity ID of the email campaign.

  ```ts
  IDENTITY
  ```

* date

  Filter. Date on which the email was bounced.

  ```ts
  TIMESTAMP
  ```

* count

  Metric. Exact number of times an email was bounced.

  ```ts
  INTEGER
  ```

### SessionsCustomerShopifyEmailClickedConditions

Fields you can use inside \`customer.shopify\_email.clicked MATCHES (...)\` when querying \`FROM sessions\`.

* activity\_id

  Filter. Marketing activity ID of the email campaign.

  ```ts
  IDENTITY
  ```

* date

  Filter. Date on which the email was clicked.

  ```ts
  TIMESTAMP
  ```

* count

  Metric. Exact number of times an email was clicked.

  ```ts
  INTEGER
  ```

### SessionsCustomerShopifyEmailDeliveredConditions

Fields you can use inside \`customer.shopify\_email.delivered MATCHES (...)\` when querying \`FROM sessions\`.

* activity\_id

  Filter. Marketing activity ID of the email campaign.

  ```ts
  IDENTITY
  ```

* date

  Filter. Date on which the email was delivered.

  ```ts
  TIMESTAMP
  ```

* count

  Metric. Exact number of times an email was delivered.

  ```ts
  INTEGER
  ```

### SessionsCustomerShopifyEmailMarkedAsSpamConditions

Fields you can use inside \`customer.shopify\_email.marked\_as\_spam MATCHES (...)\` when querying \`FROM sessions\`.

* activity\_id

  Filter. Marketing activity ID of the email campaign.

  ```ts
  IDENTITY
  ```

* date

  Filter. Date on which the email was marked as spam.

  ```ts
  TIMESTAMP
  ```

* count

  Metric. Exact number of times an email was marked as spam.

  ```ts
  INTEGER
  ```

### SessionsCustomerShopifyEmailOpenedConditions

Fields you can use inside \`customer.shopify\_email.opened MATCHES (...)\` when querying \`FROM sessions\`.

* activity\_id

  Filter. Marketing activity ID of the email campaign.

  ```ts
  IDENTITY
  ```

* date

  Filter. Date on which the email was opened.

  ```ts
  TIMESTAMP
  ```

* count

  Metric. Exact number of times an email was opened.

  ```ts
  INTEGER
  ```

### SessionsCustomerShopifyEmailUnsubscribedConditions

Fields you can use inside \`customer.shopify\_email.unsubscribed MATCHES (...)\` when querying \`FROM sessions\`.

* activity\_id

  Filter. Marketing activity ID of the email campaign.

  ```ts
  IDENTITY
  ```

* date

  Filter. Date on which the email was unsubscribed.

  ```ts
  TIMESTAMP
  ```

* count

  Metric. Exact number of times an email was unsubscribed.

  ```ts
  INTEGER
  ```

### SessionsCustomerStoreCreditAccountsConditions

Fields you can use inside \`customer.store\_credit\_accounts MATCHES (...)\` when querying \`FROM sessions\`.

* balance

  Filter. Amount available to spend.

  ```ts
  FLOAT
  ```

* currency

  Filter. Currency associated with the account.

  ```ts
  STRING
  ```

* last\_credit\_date

  Filter. Date when credits were last added.

  ```ts
  TIMESTAMP
  ```

* next\_expiry\_date

  Filter. Date when credits expire.

  ```ts
  TIMESTAMP
  ```

### FLOAT

A floating-point number used for measurements, rates, and other continuous numeric values.

```ts
```

### SessionsCustomerStorefrontEventCollectionViewedConditions

Fields you can use inside \`customer.storefront\_event.collection\_viewed MATCHES (...)\` when querying \`FROM sessions\`.

* date

  Filter. Date collection was viewed.

  ```ts
  TIMESTAMP
  ```

* id

  Filter. Collection ID.

  ```ts
  IDENTITY
  ```

* count

  Metric. Times collection was viewed.

  ```ts
  INTEGER
  ```

### SessionsCustomerStorefrontEventProductViewedConditions

Fields you can use inside \`customer.storefront\_event.product\_viewed MATCHES (...)\` when querying \`FROM sessions\`.

* date

  Filter. Date product was viewed.

  ```ts
  TIMESTAMP
  ```

* id

  Filter. Product ID.

  ```ts
  IDENTITY
  ```

* count

  Metric. Times product was viewed.

  ```ts
  INTEGER
  ```

### SessionsCustomerWithinDistanceConditions

Fields you can use inside \`customer.within\_distance MATCHES (...)\` when querying \`FROM sessions\`.

* coordinates

  Filter. Latitude and longitude of location. Required.

  ```ts
  GEO_COORDINATE
  ```

* distance\_km

  Filter. Maximum distance from location, in kilometers. Required: provide one of the \`distance\_km/mi\` group.

  ```ts
  FLOAT
  ```

* distance\_mi

  Filter. Maximum distance from location, in miles. Required: provide one of the \`distance\_km/mi\` group.

  ```ts
  FLOAT
  ```

### GEO\_COORDINATE

A geographic coordinate value.

```ts
```

***

## Related schemas

* [`searches`](https://shopify.dev/docs/api/shopifyql/latest/schemas/sessions_and_behavior/searches): Storewide search volume and intent for what shoppers look for during sessions.
* [`search_conversions`](https://shopify.dev/docs/api/shopifyql/latest/schemas/sessions_and_behavior/search_conversions): Search-driven funnel volume for isolating sessions that included a search.
* [`web_performance`](https://shopify.dev/docs/api/shopifyql/latest/schemas/sessions_and_behavior/web_performance): Page load metrics to pair session behavior with performance signals.

***
