← Back to Metrics

Carts Created

Also known as: Carts, Cart Opens, Carts Opened, New Carts, Cart Creations

ConversionmetricE-commerce: Cart & Checkout Funnel AnalyticsE-commerce

Count of distinct shopping carts opened in the reporting window, one per cart_id, dated to its first add_to_cart. Unlike Add to cart, later adds to the same cart do not count again.

Business Use Case

1️⃣ Merchandising sees Carts Created fall against Unique Visitors and reviews add-to-cart placement on product pages.,2️⃣ Product tracks adds per cart created after a mini-cart release and keeps the change if adds per cart rise.,3️⃣ Marketing sizes abandoned-cart email volume from Carts Created by traffic source before setting send budgets.

Business Criticality

High

Journey / Navigation Area

Checkout

Owning Function

Merchandising

Scope

Event

Formula

COUNT(DISTINCT cart_id WHERE event_name = 'add_to_cart' AND cart_id IS NOT NULL AND MIN(event_timestamp) per cart_id IN reporting window AND traffic_type != 'internal')

Calculation Notes

1️⃣ A cart counts once, in the window of its first add_to_cart; later adds, removals and re-adds to the same cart_id never count again.,2️⃣ A cart emptied and refilled keeps its cart_id and is not new; a new cart_id issued after purchase or cart expiry counts as a new cart.,3️⃣ Exclude add_to_cart events with a null or empty cart_id; a missing cart_id is an instrumentation gap to fix, not a cart.,4️⃣ Exclude internal traffic (traffic_type = 'internal').,5️⃣ Each cart_id sent in the data layer counts as its own cart; a guest cart merged into an account cart at login may count twice.,6️⃣ Additive across periods: each cart is dated to its first add, so daily counts sum to the weekly and monthly totals.,7️⃣ The Adobe counterpart is the Carts metric (scOpen), which is not used here; this item counts the first scAdd per cartID.

Technical Details

Measure TypeCounter
Aggregation WindowDaily, Weekly, Monthly

Events

PlatformEvent
Google Analytics 4add_to_cart
AdobescAdd

Data Mappings

W3 Data Layer
{
  "event": [
    {
      "eventInfo": {
        "eventName": "add_to_cart",
        "add_method": "button",
        "add_source": "product_page",
        "page_type": "product_detail",
        "item_list_id": "related_products",
        "item_list_name": "Related Products",
        "traffic_type": "external"
      }
    }
  ],
  "cart": {
    "cartID": "cart_8841273",
    "price": {
      "cartTotal": "49.99",
      "currency": "USD"
    },
    "item": [
      {
        "productInfo": {
          "productID": "SKU_12345",
          "productName": "Wireless Mouse"
        },
        "price": {
          "unitPrice": "49.99"
        },
        "quantity": "1"
      }
    ]
  },
  "user": [
    {
      "profile": [
        {
          "profileInfo": {
            "profileID": "u_582910"
          }
        }
      ]
    }
  ]
}
GA4 Data Layer
{
  "event": "add_to_cart",
  "ecommerce": {
    "currency": "USD",
    "value": 49.99,
    "cart_id": "cart_8841273",
    "items": [
      {
        "item_id": "SKU_12345",
        "item_name": "Wireless Mouse",
        "price": 49.99,
        "quantity": 1
      }
    ]
  },
  "user_id": "u_582910",
  "traffic_type": "external",
  "add_method": "button",
  "page_type": "product_detail",
  "add_source": "product_page",
  "item_list_id": "related_products",
  "item_list_name": "Related Products"
}
Adobe Client Data Layer
{
  "event": "scAdd",
  "cart": {
    "cartId": "cart_8841273",
    "currency": "USD",
    "value": 49.99
  },
  "product": [
    {
      "items": {
        "SKU_12345": {
          "price": 49.99,
          "quantity": 1
        }
      }
    }
  ],
  "user": {
    "userId": "u_582910",
    "trafficType": "external"
  },
  "page": {
    "pageType": "product_detail"
  },
  "addMethod": "button",
  "addSource": "product_page",
  "itemListId": "related_products",
  "itemListName": "Related Products"
}
XDM Mapping
{
  "eventType": "commerce.productListAdds",
  "timestamp": "2026-09-26T14:22:00Z",
  "commerce": {
    "cart": {
      "cartID": "cart_8841273"
    },
    "productListAdds": {
      "value": 1,
      "currencyCode": "USD"
    }
  },
  "productListItems": [
    {
      "SKU": "SKU_12345",
      "name": "Wireless Mouse",
      "priceTotal": 49.99,
      "quantity": 1
    }
  ],
  "_tenant": {
    "trafficType": "external"
  },
  "_experience": {
    "analytics": {
      "customDimensions": {
        "eVars": {
          "eVar_add_method": "button",
          "eVar_add_source": "product_page",
          "eVar_item_list_id": "related_products",
          "eVar_item_list_name": "Related Products"
        }
      }
    }
  }
}

SQL Queries

Google Analytics 4 (BigQuery)
-- ==========================================
-- 1. GOOGLE BIGQUERY SQL
-- ==========================================
DECLARE start_date DATE DEFAULT DATE_SUB(CURRENT_DATE(), INTERVAL 90 DAY);
DECLARE end_date DATE DEFAULT DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY);

-- Each cart_id counts as its own cart; a guest cart merged into an account cart at login may count twice.
-- add_to_cart events up to end_date (no lower bound, so a cart's true first add is found), params pivoted with UNNEST
WITH adds AS (
  SELECT
    event_date,
    (SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'cart_id') AS cart_id,
    (SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'traffic_type') AS traffic_type
  FROM `your-project.analytics_123456789.events_*`
  WHERE _TABLE_SUFFIX <= FORMAT_DATE('%Y%m%d', end_date)
    AND event_name = 'add_to_cart'
),
-- drop null/empty cart_id and internal traffic, then date each cart to its first add_to_cart
first_adds AS (
  SELECT cart_id, PARSE_DATE('%Y%m%d', MIN(event_date)) AS first_add_date
  FROM adds
  WHERE NULLIF(TRIM(cart_id), '') IS NOT NULL
    AND COALESCE(traffic_type, '') != 'internal'
  GROUP BY cart_id
)
-- carts whose first add falls in the reporting window
SELECT COUNT(*) AS carts_created
FROM first_adds
WHERE first_add_date BETWEEN start_date AND end_date;
Adobe Experience Platform (AEP Query Service)
-- ==========================================
-- 2. ADOBE AEP QUERY SERVICE SQL
-- ==========================================
-- Each cartID counts as its own cart; a guest cart merged into an account cart at login may count twice.
-- reporting window: the last 90 complete days
WITH params AS (
  SELECT date_sub(current_date(), 90) AS start_date, date_sub(current_date(), 1) AS end_date
),
-- productListAdds events up to end_date (no lower bound, so a cart's true first add is found)
adds AS (
  SELECT
    e.timestamp,
    e.commerce.cart.cartID AS cart_id,
    e._tenant.trafficType AS traffic_type
  FROM aep_web_events_dataset e
  CROSS JOIN params p
  WHERE e.eventType = 'commerce.productListAdds'
    AND to_date(e.timestamp) <= p.end_date
),
-- drop null/empty cartID and internal traffic, then date each cart to its first add
first_adds AS (
  SELECT cart_id, to_date(MIN(timestamp)) AS first_add_date
  FROM adds
  WHERE NULLIF(TRIM(cart_id), '') IS NOT NULL
    AND COALESCE(traffic_type, '') != 'internal'
  GROUP BY cart_id
)
-- carts whose first add falls in the reporting window
SELECT COUNT(*) AS carts_created
FROM first_adds f
CROSS JOIN params p
WHERE f.first_add_date BETWEEN p.start_date AND p.end_date;

Source Data

Digital Analytics (GA4)

Dependencies

Prerequisite: List the dependencies required for this Metric

Events:

add-to-cart

Metrics:

Report Attributes

Device Category Traffic Source Page Type Customer Status

Recommended Reporting Views

Views
Cart & Checkout FunnelDaily Trading Report

Segment Eligibility

true

Governance

Data SensitivityInternal

Derived KPIs

Governance

Created bydevyendarm
Created on9/26/2026
Last modified bydevyendarm
Last modified on9/26/2026
Version1.0.0
Validation stateqa passed
StatusPUBLISHED

GitHub

View related Pull Requestcatalog/metrics/carts-created.yml

Community Discussion