Product Added to Cart
When to Use
Trigger this event when a visitor adds one or more products to their shopping cart — via the "Add to Cart" button, quick-add actions, or when increasing quantity of an existing cart item.
Trigger this event only after the cart addition is confirmed successful, not on button click alone.
Complete Reference
event object required
name string required
Use only static value product_added_to_cart for event.name.
name: "product_added_to_cart"
value number required
Total value of products being added to cart (price x quantity for each product).
value: 349.98
currency string required
Currency code for all monetary values in this event. Can be overridden in nested objects.
currency: "EUR"
exchange_rate number
Custom exchange rate for multi-currency. Default is 1.
exchange_rate: 1
id string
Optional event identifier.
id: "ADD_CART_12345"
context object
url string required-if-applicable
Collected automatically for standard websites. Required only for SPA applications where URL changes don't trigger automatic page context updates.
url:"https://shop.example.com/products/laptop?color=silver&storage=512gb&utm_source=google"
URL Parameter Sensitivity: Be mindful of sensitive information in URLs. Query parameters may contain personal identifiers, session tokens, or private information that should be handled according to privacy regulations.
page_type string recommended
Type of page (product, home ...)
page_type: "product"
environment string recommended
Allowed values: prod, dev
environment: "prod"
products array required
Array containing the products being added to cart. View complete Product Object documentation
products[0] object required
id string required
Unique product identifier in your system.
id: "PRODUCT_ID"
parent_id string recommended
Parent product ID for variants or child products. Defaults to id if not provided.
parent_id: "PRODUCT_PARENT_ID"
name string required
Product name or title displayed to users.
name: "Professional Wireless Headphones"
parent_name string
Parent product name for variants or child products. Defaults to name if not provided.
parent_name: "Professional Headphones Collection"
price_base number required
Original or base price before discounts. Always equal to or greater than price.
price_base: 299.99
price number required
Current selling price after discounts. Always equal to or less than price_base.
price: 249.99
tax_included boolean required
Whether the price includes taxes. Defaults to true if not provided.
tax_included: true
tax_percent number required
Tax percentage applied to the product (0-50). If not provided, the site default tax rate will be used (generally the standard rate of the country).
tax_percent: 19
quantity number required
Quantity of this product in the context of the event. Defaults to 1 if not provided.
quantity: 2
category string recommended
Main product category name
category: "Electronics"
sku string
Product SKU (Stock Keeping Unit) for inventory tracking
sku: "SKU_HEADPHONES_PRO"
parent_sku string
Parent product SKU for variants or child products. Defaults to sku if not provided.
parent_sku: "SKU_HEADPHONES"
gtin string
Global Trade Item Number for product identification
gtin: "1234567890123"
mpn string
Manufacturer Part Number assigned by the manufacturer
mpn: "HP-PRO-2024"
ean string
European Article Number for product barcoding
ean: "1234567890123"
brand string
Product brand or manufacturer name
brand: "AudioTech"
type string
Product type. Free-form string (e.g. "simple", "variable", "bundle", "subscription").
type: "simple"
stock_status boolean recommended
Product availability (true = in stock, false = out of stock). Defaults to true if not provided.
stock_status: true
stock_location string
Physical location or warehouse where product is stored
stock_location: "Main Warehouse EU"
created_at number
Timestamp when product was added to inventory (milliseconds)
created_at: 1748505040077
url string
Direct URL to the product page
url: "https://shop.example.com/products/headphones-pro"
parent_url string
URL to the parent product page (for variants)
parent_url: "https://shop.example.com/products/headphones-collection"
image string
Main product image URL
image: "https://cdn.example.com/headphones-main.jpg"
images array
Array of additional product image URLs
images: [
"https://cdn.example.com/headphones-front.jpg",
"https://cdn.example.com/headphones-side.jpg"
]
categories array
Array of category objects with name and id properties
- name (string, required) - Category name
- id (string) - Category identifier
categories: [
{ name: "Electronics", id: "cat_electronics" },
{ name: "Audio", id: "cat_audio" }
]
coupons array
Array of product-level coupons applied to this product. View complete Coupon Object documentation
coupons[0] (object) - required
requiredname string required
Coupon name or code.
name: "FREE SHIPPING"
value number recommended
Coupon discount value.
value: 123.99
tax_included boolean recommended
Whether coupon value includes taxes
tax_included: true
tax_percent number recommended
Tax percentage for the coupon
tax_percent: 21
id string
Coupon internal identifier.
id: "COUPON_INTERNAL_ID"
type string
Coupon type. Free-form string, use consistent naming (e.g. "LOYALTY", "SEASONAL", "FIRST_ORDER", "SHIPPING").
type: "SHIPPING"
currency string required-if-applicable
Currency code. Specifies the currency code when it differs from event.currency.
currency: "USD"
exchange_rate number
Custom exchange rate for multi-currency. Default has value 1. Specifies when it differs from event.exchange_rate.
exchange_rate: 1
properties object recommended
Custom product attributes for audience segmentation. Free-form key-value object. Use properties that match your product catalog and business needs.
Use the properties object to store custom product attributes, with property names defined by each business as needed, that enable advanced segmentation, personalization, and analytics across your marketing campaigns.
- IT & C
- Fashion
- Deco
properties: {
color: "space_gray",
storage: "256GB",
memory: "16GB",
connectivity: ["wifi", "bluetooth"],
warranty: "2_years",
energy_rating: "A++",
brand_series: "pro_line"
}
properties: {
color: ["black", "white"],
size: "M",
material: "cotton",
fit: "regular",
season: "summer",
collection: "2024_spring",
care_instructions: "machine_wash"
}
properties: {
color: ["natural", "oak"],
dimensions: "120x80x75cm",
material: ["wood", "metal"],
style: "modern",
room_type: ["living_room", "office"],
assembly_required: "true"
}
currency string required-if-applicable
Currency code. Specifies the currency code when it differs from event.currency.
currency: "USD"
exchange_rate number
Custom exchange rate for multi-currency. Default has value 1. Specifies when it differs from event.exchange_rate.
exchange_rate: 1
user object recommended
id string recommended
Unique customer identifier in your system.
id: "CUSTOMER_INTERNAL_ID"
email string recommended
Customer email address in plaintext. Do not send pre-hashed values — DATA Reshape automatically normalizes and hashes before sending to destinations.
email: "[email protected]"
phone string recommended
Customer phone number in E.164 format (plaintext). Do not send pre-hashed values — DATA Reshape automatically normalizes and hashes before sending to destinations.
phone: "+40712345678"
first_name string recommended
Customer first name
first_name: "John"
last_name string recommended
Customer last name
last_name: "Doe"
country string
Country name or ISO country code
country: "Romania"
region string recommended
State, province, or region name
region: "Bucuresti"
city string recommended
City or locality name
city: "Bucuresti"
street string
Street address including number
street: "Strada Principala 1"
postal_code string
Postal code or ZIP code
postal_code: "700000"
orders_total_number number recommended
Cumulative number of orders placed by this user
orders_total_number: 5
orders_canceled_number number recommended
Cumulative number of orders placed and canceled by this user
orders_canceled_number: 0
orders_total_value number recommended
Cumulative lifetime user orders value (decimal format: 2500.50)
orders_total_value: 1234.99
orders_refunded_value number recommended
Cumulative lifetime user orders value canceled (decimal format: 2500.50)
orders_refunded_value: 250.99
predicted_value number
Predicted lifetime value of a customer for your business
predicted_value: 100.99
created_at number recommended
Timestamp in milliseconds since Unix epoch representing the first time the user was recorded
created_at: 1754926521690
properties object recommended
Custom Customer Properties Examples
Use the properties object to store custom user attributes, with property names defined by each business as needed, that enable advanced segmentation, personalization, and analytics across your marketing campaigns.
- E-commerce Customer
- B2B Lead/Customer
- Subscription Service
- Content Platform
properties: {
customer_type: "returning",
membership_level: "platinum",
preferred_category: ["electronics", "fashion"],
last_purchase_date: "2024-12-15",
average_order_value: "350.00",
payment_method_preference: "card",
registration_date: "2023-06-15"
}
properties: {
company_size: "enterprise",
industry: "fintech",
job_title: "marketing_director",
decision_maker: "true",
budget_range: "50000-100000",
lead_source: ["linkedin", "webinar"],
qualification_status: "qualified",
sales_stage: "proposal"
}
properties: {
subscription_tier: "premium",
billing_cycle: "annual",
feature_usage: ["analytics", "reporting", "api"],
trial_user: "false",
renewal_date: "2025-06-30",
support_level: "priority",
usage_frequency: "daily"
}
properties: {
content_preferences: ["technology", "business"],
engagement_level: "high",
newsletter_subscriber: "true",
social_media_follower: "true",
content_consumption: "premium",
device_preference: ["mobile", "desktop"],
timezone: "Europe/Bucharest"
}
Examples
- Complete
- Minimal
window.reshape = window.reshape || [];
reshape.push({
"event": {
"name": "product_added_to_cart",
"value": 349.98,
"currency": "EUR",
"exchange_rate": 1
},
"context": {
"url": "https://shop.example.com/wireless-earbuds-pro",
"page_type": "product",
"environment": "prod"
},
"products": [
{
"id": "EARBUDS_PRO_001",
"parent_id": "EARBUDS_PRO_SERIES",
"name": "Wireless Earbuds Pro - White",
"parent_name": "Wireless Earbuds Pro",
"price_base": 199.99,
"price": 174.99,
"tax_included": true,
"tax_percent": 19,
"quantity": 2,
"category": "Electronics > Audio > Wireless Earbuds",
"currency": "EUR",
"exchange_rate": 1,
"sku": "EB-PRO-WHT-001",
"parent_sku": "EB-PRO-001",
"gtin": "9876543210987",
"mpn": "EB-PRO-2024-001",
"ean": "9876543210987",
"brand": "AudioTech",
"type": "simple",
"stock_status": true,
"stock_location": "Audio Warehouse EU",
"created_at": 1748505040077,
"url": "https://shop.example.com/wireless-earbuds-pro?color=white",
"parent_url": "https://shop.example.com/wireless-earbuds-pro",
"image": "https://cdn.example.com/earbuds-pro-white.jpg",
"images": [
"https://cdn.example.com/earbuds-pro-white-case.jpg",
"https://cdn.example.com/earbuds-pro-white-side.jpg"
],
"categories": [
{ "name": "Electronics", "id": "cat_electronics" },
{ "name": "Audio", "id": "cat_audio" },
{ "name": "Wireless Earbuds", "id": "cat_wireless_earbuds" }
],
"properties": {
"color": "white",
"connectivity": "bluetooth_5.3",
"noise_cancellation": "active",
"battery_life": "24_hours_with_case",
"water_resistance": "IPX4"
}
}
],
"user": {
"id": "CUST_12345",
"email": "[email protected]",
"phone": "+40712345678",
"first_name": "Alexandru",
"last_name": "Popescu",
"country": "RO",
"region": "Bucuresti",
"city": "Bucuresti",
"orders_total_number": 8,
"orders_canceled_number": 1,
"orders_total_value": 2156.75,
"orders_refunded_value": 299.99,
"predicted_value": 3500.00,
"created_at": 1640995200000,
"properties": {
"customer_segment": "loyal",
"acquisition_channel": "paid_search",
"loyalty_tier": "gold"
}
}
});
window.reshape = window.reshape || [];
reshape.push({
"event": {
"name": "product_added_to_cart",
"value": 349.98,
"currency": "EUR"
},
"products": [
{
"id": "EARBUDS_PRO_001",
"name": "Wireless Earbuds Pro",
"brand": "AudioTech",
"price_base": 199.99,
"price": 174.99,
"tax_included": true,
"tax_percent": 19,
"quantity": 2,
"category": "Electronics"
}
]
});