JavaScript events
Event hooks and runtime signals for extending Studio Arcana safely.
Use this page when you need behavior beyond Theme Editor settings but still want upgrade-safe customization.
Event strategy
- Prefer listening for existing lifecycle events before mutating DOM directly.
- Keep listeners idempotent so sections re-rendered by Shopify do not duplicate handlers.
- Scope behavior to section wrappers with data- attributes.
Typical hooks
- Product media and variant changes in assets/theme.js
- Cart drawer open/close and line-item updates
- Collection pagination append events (load-more and infinite scroll)
- Navigation clicks: studioarcana:navigation (detail: type, label, parent, href, text) and dataLayer sa_navigation_click
- Quiz completion event: studio-arcana:quiz:complete (answers, scoreMap, resolvedProfileKey, recommendation with optional staffId)
- hollow-reserve:open — dispatched when shoppers click data-hr-reserve-staff controls (specialist team, service menu, quiz result CTA)
- Lookbook analytics events: studio-arcana:lookbook:look-click, studio-arcana:lookbook:product-click, studio-arcana:lookbook:filter, studio-arcana:lookbook:load-more, studio-arcana:lookbook:quick-add
Implementation checklist
- Listen in one bootstrap function.
- Guard for missing nodes.
- Rebind after Section Rendering API responses.
- Fail silently for merchants without the optional section enabled.
Was this page helpful?
Content is maintained by Arcanum Hollow Labs. For internal engineering notes, see the docs/ folder in the monorepo.