# Track scroll events

Complete a goal when an element scrolls into view, like a pricing section or the end of an article, with supr-scroll and an optional threshold and delay.

Complete a goal when an element scrolls into view, like "saw pricing" or "read to the end". Add `supr-scroll` to it:

```
<section id="pricing" supr-scroll="saw_pricing">…</section>

<!-- a quarter visible, for at least a second, with a property -->
<footer
  supr-scroll="read_article"
  supr-scroll-threshold="0.25"
  supr-scroll-delay="1000"
  supr-scroll-article="launch-post"
>…</footer>
```

| Attribute | Meaning |
| --- | --- |
| `supr-scroll` | The goal's name. |
| `supr-scroll-threshold` | How much of the element must be visible, 0 to 1. Default 0.5. |
| `supr-scroll-delay` | Milliseconds it must stay visible. Default 0. |
| `supr-scroll-*` | Any other attribute becomes a property (dashes become underscores). |

- Each goal fires once per page view, however often the element comes back into view.
- Elements added later (single-page apps, lazy content) are watched too.

---

This page on the web: https://supranalytics.app/docs/scroll-tracking
Every documentation page: https://supranalytics.app/docs.md
