Files
zeekay d7538ed259 commerce+analytics+replay: standards-annotated checkout demo
Instrument the checkout flow as the end-to-end proof of Hanzo's native
analytics + commerce stack. Standards-only annotation (schema.org microdata +
shadcn-style data-slot; no data-hanzo-*).

- vendor/track.min.js  = [email protected]  (Hanzo Analytics) -> window.HanzoTrack
- vendor/checkout.global.js = [email protected] -> window.HanzoCheckout
  (shop.js/commerce.js are the React/Next surface; this vanilla site wires
   checkout.js directly, which shop.js itself wraps)

- analytics.js: karmaEcom emits STANDARD GA4 events (view_item, add_to_cart,
  begin_checkout, purchase) with currency/value/items[]/content_ids/slot via
  track.js native -> POST api.hanzo.ai/v1/analytics; runs Annotate() for
  content-view/click/schema; mirrors Umami. content_ids = Meta CAPI bridge.
- checkout.js: HanzoCheckout widget -> api.hanzo.ai/v1/checkout; /thank-you
  fires purchase; falls back to the existing Square path.
- replay.js: opt-in, masked session replay mount point (maskAllInputs, block
  [data-slot=payment]/.rr-block); lights up when SPA_REPLAY_SRC is set.
- app.js/index.html: Product+Offer, AddAction (add-to-cart), OrderAction
  (checkout), data-slot on every control; /thank-you route.
- verify.html: event -> annotation -> destination map + live payload viewer.

No secrets in repo: analyticsToken/checkoutKey come from /config.json
(SPA_ANALYTICS_TOKEN / SPA_CHECKOUT_KEY on the karma-style CR). Deploy is the
CTO's job via the existing hanzo.yml CI/CD.

Verified locally (hanzoai/spa + headless browser): all 4 GA4 events fire with
correct params to /v1/analytics (Bearer, [email protected] batch); Annotate emits
Product/AddAction/OrderAction content events; checkout widget creates a session;
purchase fires on /thank-you; replay records with masking; 0 console errors.
2026-07-24 01:06:51 -07:00

1.2 KiB

karma.style

The Karma Bikinis storefront — a fast, self-contained static site (no build step, no CDNs) served by the canonical Hanzo static plugin (hanzoai/static).

  • site/ — the whole site (index.html, style.css, app.js, products.js, img/, fonts/). The 2026 collection: eight designs, each shot front / back / three-quarter / flat / ghost / lifestyle / editorial.
  • Dockerfile — FROM ghcr.io/hanzoai/static + COPY site /srv, --spa, :3000.
  • hanzo.yml — canonical CI/CD (builds ghcr.io/hanzoai/karma-style, rolls the karma-style Service CR at karma.style + www.karma.style).

Storefront cart is client-side (localStorage); catalog display is products.js. Commerce (catalog/checkout), analytics, and the AI concierge widget layer on at runtime via injected snippets. Virtual try-on lives at tryon.karma.style.

The checkout flow is the end-to-end proof of Hanzo's native analytics + commerce stack: schema.org + data-slot annotated, standard GA4 ecommerce events through track.js → api.hanzo.ai/v1/analytics, checkout.js widget, opt-in masked session replay. See /verify.html and LLM.md → "Commerce + analytics + replay".