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>| Attribute | Purpose |
|---|---|
data-galya-id | Content id in your catalog |
data-galya-type | text | image | video | audio | mixed |
data-galya-expected-consumption-ms | Denominator for normalized dwell |
data-galya-no-capture | No rrweb snapshot |
data-galya-action | save | 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.