Galya
SDK

Instrumentation

Mark any element you want treated as a content unit (a listing card, article block, product tile). The SDK auto-discovers new nodes via MutationObserver—works with infinite scroll and SPAs.

Required: stable data-galya-id + data-galya-type.
Optional: expected read time (for dwell normalization), skip snapshot, terminal buttons.

<article
  data-galya-id="listing-42"
  data-galya-type="mixed"
  data-galya-expected-consumption-ms="12000"
>
  <p>Coastal loft with ocean views.</p>
  <button data-galya-action="save">Save</button>
  <a href="https://example.com/42">View</a>
</article>
AttributePurpose
data-galya-idContent id in your catalog
data-galya-typetext | image | video | audio | mixed
data-galya-expected-consumption-msDenominator for normalized dwell
data-galya-no-captureNo rrweb snapshot
data-galya-actionsave | share | expand | dismiss on buttons

An event fires when the component leaves the viewport (50% visible threshold), the tab hides, or the page unloads. External links count as click_through.