Files
our-claude-skills/ourdigital-custom-skills/20-gtm-audit/code/docs/ecommerce_schema.md
Andrew Yim eea49f9f8c refactor(skills): Restructure skills to dual-platform architecture
Major refactoring of ourdigital-custom-skills with new numbering system:

## Structure Changes
- Each skill now has code/ (Claude Code) and desktop/ (Claude Desktop) versions
- New progressive numbering: 01-09 General, 10-19 SEO, 20-29 GTM, 30-39 OurDigital, 40-49 Jamie

## Skill Reorganization
- 01-notion-organizer (from 02)
- 10-18: SEO tools split into focused skills (technical, on-page, local, schema, vitals, gsc, gateway)
- 20-21: GTM audit and manager
- 30-32: OurDigital designer, research, presentation
- 40-41: Jamie brand editor and audit

## New Files
- .claude/commands/: Slash command definitions for all skills
- CLAUDE.md: Updated with new skill structure documentation
- REFACTORING_PLAN.md: Migration documentation
- COMPATIBILITY_REPORT.md, SKILLS_COMPARISON.md: Analysis docs

## Removed
- Old skill directories (02-05, 10-14, 20-21 old numbering)
- Consolidated into new structure with _archive/ for reference

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 01:58:24 +09:00

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