Add to cart
Also known as: add_to_cart, Cart Addition, Cart Additions, scAdd, Add to Bag, Add to Basket
Captures every confirmed addition of one or more units of a product to the shopping cart, aligned to the GA4 recommended add_to_cart event and the Adobe Analytics scAdd commerce event, carrying the items array, unit price, quantity added, cart value delta and the placement the add came from. It is the primary micro-conversion between product discovery and checkout, and the event-level foundation for Add-to-Cart Rate, Item View-to-Cart Rate, Cart-to-Purchase Rate, Cart Abandonment Rate and SKU-level merchandising funnels.
Event Serialization
alwaysBusiness Use Case
1️⃣ Merchandising team: when a SKU's add_to_cart volume falls more than 20% week over week while its product views hold steady, review price competitiveness, imagery, size and colour availability and PLP placement for that SKU, and escalate stock gaps to Buying. 2️⃣ E-commerce Product Manager for Cart & Checkout: after launching PLP quick-add or a sticky mobile add-to-cart bar, compare Add-to-Cart Rate and Cart-to-Purchase Rate by add_source between control and variant, and roll out only if downstream purchase conversion does not deteriorate. 3️⃣ CRM and Lifecycle Marketing: when a consented, identified customer triggers add_to_cart with no purchase within 4 hours, enrol the customer in the abandoned-cart journey using the items payload for dynamic product content and suppress anyone who purchases in the interim. 4️⃣ Personalization and Onsite Merchandising team: each month, rank recommendation and cart-upsell placements by add_to_cart events per impression using item_list_name, and reallocate slots and algorithms away from placements that generate views without adds.
Business Criticality
High
Journey / Navigation Area
Checkout
Owning Function
Merchandising
Scope
Event
Calculation Notes
1️⃣ Fire only after the cart service returns a success response (Shopify Ajax Cart /cart/add.js 200, Salesforce Commerce Basket items POST, Adobe Commerce addProductsToCart mutation without user_errors), never on the button click; rejected adds (out of stock, variant not selected, max-quantity or purchase-limit breach, session-expired basket) must not emit the event. 2️⃣ Quantity increments on an existing line (cart-page stepper, re-adding the same SKU from the PDP) emit add_to_cart with quantity equal to the delta added, not the new line total; decrements route to remove_from_cart, and system-driven cart changes (persistent-cart restore, guest-to-account cart merge on login, price or promotion recalculation) emit nothing. 3️⃣ value = Σ(price × quantity added) across the items array, where price is the unit selling price after item-level markdowns and before order-level coupons, tax and shipping; currency (ISO 4217) is mandatory whenever value is populated, otherwise GA4 discards the monetary value. Values are reported per currency and never summed across currencies without a dated FX conversion. Bundles and kits send the parent SKU at bundle price with components as zero-price items to avoid double-counting. 4️⃣ Source context is captured in add_source (pdp, plp_quick_add, search_results, recommendation, wishlist, cart_upsell, reorder, mini_cart) and item_list_id / item_list_name; list attribution is persisted from the originating select_item so a PLP or recommendation click that converts on the PDP retains its list credit. 5️⃣ Double-click and retry protection: the add-to-cart CTA is disabled while the request is in flight, and any duplicate with the same cart_id, item_id and item_variant received within 2 seconds is collapsed to a single event; server-side retries must reuse the original idempotency key. 6️⃣ Before the event feeds any KPI, remove known bots and spiders, internal traffic, staging and QA hostnames, synthetic monitoring and load-test user agents, and employee test accounts, using the mechanism each platform provides: in GA4, automatic bot filtering plus the internal-traffic rule (traffic_type), debug_mode and an excluded user ID list; in Adobe Analytics, report-suite bot rules and IP exclusions; in AEP datasets, which carry no report-suite filtering, explicit query filters on hostname, user agent, internal IP range (environment.ipV4) and an excluded identity list (ECID / CRM ID). 7️⃣ Session attribution follows the platform session definition (GA4 30-minute inactivity timeout, Adobe visit expiry); rate KPIs count sessions or users with at least one add_to_cart once, while volume metrics count every event. Reporting date uses the property time zone, and BigQuery daily export tables settle within 24–72 hours, so same-day figures are provisional.
Platform Events
| Platform | Event |
|---|---|
| Google Analytics 4 | add_to_cart |
| Adobe | scAdd |
Data Mappings
W3 Data Layer
{
"cart": {
"cartID": "c7f3a2e1-5b8d-4e9a-9c61-2d4f8b0e7a35",
"price": {
"basePrice": 119.98,
"voucherCode": "WINTERKNIT10",
"voucherDiscount": 20,
"currency": "USD",
"cartTotal": 99.98
},
"item": [
{
"productInfo": {
"productID": "KNT-20418",
"sku": "KNT-20418-NVY-M",
"productName": "Merino Crew Neck Sweater",
"manufacturer": "Northfield"
},
"category": {
"primaryCategory": "Womens",
"subCategory1": "Knitwear"
},
"quantity": 2,
"price": {
"basePrice": 59.99,
"voucherCode": "WINTERKNIT10",
"voucherDiscount": 10,
"currency": "USD"
},
"attributes": {
"itemVariant": "Navy / M",
"sellingPrice": 49.99,
"itemListID": "plp_womens_knitwear",
"itemListName": "Womens Knitwear",
"index": 3
}
}
]
},
"event": [
{
"eventInfo": {
"eventName": "add_to_cart",
"eventAction": "cart:add",
"type": "commerce"
},
"category": {
"primaryCategory": "Cart & Checkout"
},
"attributes": {
"cartID": "c7f3a2e1-5b8d-4e9a-9c61-2d4f8b0e7a35",
"addSource": "plp_quick_add",
"itemListID": "plp_womens_knitwear",
"itemListName": "Womens Knitwear",
"value": 99.98,
"currency": "USD"
}
}
]
}GA4 Data Layer
{
"event": "add_to_cart",
"cart_id": "c7f3a2e1-5b8d-4e9a-9c61-2d4f8b0e7a35",
"add_source": "plp_quick_add",
"ecommerce": {
"currency": "USD",
"value": 99.98,
"item_list_id": "plp_womens_knitwear",
"item_list_name": "Womens Knitwear",
"items": [
{
"item_id": "KNT-20418-NVY-M",
"item_name": "Merino Crew Neck Sweater",
"item_brand": "Northfield",
"item_category": "Womens",
"item_category2": "Knitwear",
"item_variant": "Navy / M",
"item_list_id": "plp_womens_knitwear",
"item_list_name": "Womens Knitwear",
"index": 3,
"price": 49.99,
"discount": 10,
"coupon": "WINTERKNIT10",
"quantity": 2
}
]
}
}Adobe Client Data Layer
{
"event": "cart:add",
"eventInfo": {
"eventName": "scAdd",
"addSource": "plp_quick_add"
},
"cart": {
"cartID": "c7f3a2e1-5b8d-4e9a-9c61-2d4f8b0e7a35",
"currency": "USD",
"value": 99.98,
"addSource": "plp_quick_add",
"itemListID": "plp_womens_knitwear",
"itemListName": "Womens Knitwear"
},
"product": [
{
"productID": "KNT-20418-NVY-M",
"name": "Merino Crew Neck Sweater",
"brand": "Northfield",
"category": "Womens",
"subCategory": "Knitwear",
"variant": "Navy / M",
"price": 49.99,
"quantity": 2,
"discount": 10,
"coupon": "WINTERKNIT10",
"index": 3,
"itemListID": "plp_womens_knitwear",
"itemListName": "Womens Knitwear"
}
]
}XDM Mapping
{
"xdm": {
"eventType": "commerce.productListAdds",
"commerce": {
"productListAdds": {
"value": 1
},
"cart": {
"cartID": "c7f3a2e1-5b8d-4e9a-9c61-2d4f8b0e7a35"
}
},
"productListItems": [
{
"SKU": "KNT-20418-NVY-M",
"name": "Merino Crew Neck Sweater",
"quantity": 2,
"priceTotal": 99.98,
"discountAmount": 20,
"currencyCode": "USD",
"productAddMethod": "plp_quick_add",
"selectedOptions": [
{
"attribute": "colour",
"value": "Navy"
},
{
"attribute": "size",
"value": "M"
}
],
"productCategories": [
{
"categoryID": "womens-knitwear",
"categoryName": "Knitwear",
"categoryPath": "Womens/Knitwear"
}
],
"_tenant": {
"itemBrand": "Northfield",
"itemVariant": "Navy / M",
"unitPrice": 49.99,
"couponCode": "WINTERKNIT10",
"itemListIndex": 3
}
}
],
"_tenant": {
"cartAdd": {
"addSource": "plp_quick_add",
"itemListID": "plp_womens_knitwear",
"itemListName": "Womens Knitwear",
"cartValueAdded": 99.98
}
}
}
}Parameters
{
"items": "array - one object per product line added; each object carries the item_* fields below",
"value": "number - monetary value added in this event: sum of price × quantity added across all items, before order-level discounts, tax and shipping",
"cart_id": "string - platform cart or basket identifier; used for duplicate suppression and joins to cart and order records, never an email or customer identifier",
"currency": "string - ISO 4217 currency code of value and item prices (e.g. USD); required whenever value is sent",
"add_source": "string - placement that triggered the add: pdp, plp_quick_add, search_results, recommendation, wishlist, cart_upsell, reorder, mini_cart",
"item_list_id": "string - identifier of the product list or recommendation module the item was selected from, persisted from select_item",
"items[].index": "integer - position of the item within the originating list, when added from a list",
"items[].price": "number - unit selling price after item-level markdowns, in the event currency",
"item_list_name": "string - human-readable name of the originating product list or recommendation module (e.g. Search Results, You May Also Like)",
"items[].coupon": "string - item-level coupon or promotion code active at the time of the add, if any",
"items[].item_id": "string - SKU or product ID matching the product catalog feed",
"items[].discount": "number - unit-level markdown amount applied to the item, if any",
"items[].quantity": "integer - units added in this event (delta, not resulting line quantity)",
"items[].item_name": "string - product display name",
"items[].item_brand": "string - product brand",
"items[].item_variant": "string - selected variant such as size, colour or pack size, or the variant SKU",
"items[].item_category": "string - top-level merchandise category; item_category2 to item_category5 carry the deeper hierarchy"
}Source Data
Digital Analytics (GA4 / Adobe Analytics)
Dependencies
Prerequisite: List the dependencies required for this Event
Dimensions:
Report Attributes
Item ID / SKU Item Name Item Brand Item Category Item Variant Item List Name Add Source Device Category Session Source / Medium New vs Returning User
Segment Eligibility
true
Governance
Dimensions
Derived Dimensions
Derived Entities
Derived Metrics
Governance & Metadata
GitHub
catalog/events/add-to-cart.yml