Renumber 12 existing skills to new ranges: - SEO: 11→13, 12→18, 13→16, 14→17, 15→14, 16→15, 17→29, 18→30, 19→12 - GTM: 20→60, 21→61, 22→62 Update cross-references in gateway architect/builder skills, GTM guardian README, CLAUDE.md (skill tables + directory layout), and AGENTS.md (domain routing ranges). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4.1 KiB
4.1 KiB
E-commerce DataLayer Schema Reference
GA4 E-commerce Structure
Items Array Schema
Every e-commerce event requires an items array:
items: [{
// Required
item_id: "SKU_12345",
item_name: "Blue T-Shirt",
// Recommended
affiliation: "Store Name",
coupon: "SUMMER_SALE",
discount: 5.00,
index: 0,
item_brand: "Brand Name",
item_category: "Apparel",
item_category2: "Men",
item_category3: "Shirts",
item_category4: "T-Shirts",
item_category5: "Short Sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "Blue/Large",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 29.99,
quantity: 1
}]
Clear Previous E-commerce Data
Always clear before new e-commerce event:
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: "view_item",
ecommerce: {
// new data
}
});
Complete Purchase Flow
1. Product List View
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: "view_item_list",
ecommerce: {
item_list_id: "category_results",
item_list_name: "Category Results",
items: [
{ item_id: "SKU_001", item_name: "Product 1", index: 0, price: 29.99 },
{ item_id: "SKU_002", item_name: "Product 2", index: 1, price: 39.99 }
]
}
});
2. Product Click
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: "select_item",
ecommerce: {
item_list_id: "category_results",
item_list_name: "Category Results",
items: [{
item_id: "SKU_001",
item_name: "Product 1",
price: 29.99
}]
}
});
3. Product Detail View
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: "view_item",
ecommerce: {
currency: "USD",
value: 29.99,
items: [{
item_id: "SKU_001",
item_name: "Product 1",
item_brand: "Brand",
item_category: "Category",
price: 29.99,
quantity: 1
}]
}
});
4. Add to Cart
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: "add_to_cart",
ecommerce: {
currency: "USD",
value: 29.99,
items: [{
item_id: "SKU_001",
item_name: "Product 1",
price: 29.99,
quantity: 1
}]
}
});
5. View Cart
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: "view_cart",
ecommerce: {
currency: "USD",
value: 59.98,
items: [
{ item_id: "SKU_001", item_name: "Product 1", price: 29.99, quantity: 1 },
{ item_id: "SKU_002", item_name: "Product 2", price: 29.99, quantity: 1 }
]
}
});
6. Begin Checkout
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: "begin_checkout",
ecommerce: {
currency: "USD",
value: 59.98,
coupon: "DISCOUNT10",
items: [...]
}
});
7. Add Shipping Info
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: "add_shipping_info",
ecommerce: {
currency: "USD",
value: 59.98,
shipping_tier: "Standard",
items: [...]
}
});
8. Add Payment Info
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: "add_payment_info",
ecommerce: {
currency: "USD",
value: 59.98,
payment_type: "Credit Card",
items: [...]
}
});
9. Purchase
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: "purchase",
ecommerce: {
transaction_id: "T_12345",
value: 65.97,
tax: 4.99,
shipping: 5.99,
currency: "USD",
coupon: "DISCOUNT10",
items: [{
item_id: "SKU_001",
item_name: "Product 1",
affiliation: "Online Store",
coupon: "DISCOUNT10",
discount: 3.00,
item_brand: "Brand",
item_category: "Category",
price: 29.99,
quantity: 1
}]
}
});
Korean E-commerce Considerations
Currency
currency: "KRW",
value: 35000 // No decimals for KRW
Common Korean Platform Integrations
- Cafe24: Uses custom dataLayer structure
- Shopify Korea: Standard GA4 format
- Naver SmartStore: Custom pixel implementation