Section views Pro
Find out which sections of your page actually get seen. Mark a section with data-clamp-section and Clamp fires section_viewed the first time it scrolls into view — once per session, per section.
Enable
init("proj_xxx", { extensions: { sectionViews: true } })
// or, in React:
<Analytics projectId="proj_xxx" extensions={{ sectionViews: true }} />Then mark the sections you want to measure. Names are arbitrary — pick anything that's meaningful in your dashboard.
<section data-clamp-section="hero">...</section>
<section data-clamp-section="pricing_table">...</section>
<section data-clamp-section="testimonials">...</section>
<section data-clamp-section="final_cta">...</section>What fires
One section_viewed event the first time the section crosses the visibility threshold. Properties:
| Property | Example | Notes |
|---|---|---|
section | pricing_table | The exact value of the data-clamp-section attribute. |
pathname | /pricing | The page where the section was viewed. Lets you slice by route. |
Threshold
By default the event fires when 40% of the section is in the viewport. Lower the threshold to count near-hits; raise it to require more committed engagement.
init("proj_xxx", {
extensions: {
sectionViews: { threshold: 0.6 },
},
})How it works
A single IntersectionObserverwatches every marked section. When a section first crosses the threshold, the event fires and that element is unobserved — subsequent scrolls don’t re-fire it. A second observer watches the DOM for sections added later (SPA navigations, lazy-mounted content), so dynamic pages are covered.
When to use it
- Below-the-fold engagement. Are visitors making it to your pricing card? Your testimonials? Your final CTA?
- Funnel analysis. Combine
section_viewedevents with funnels to measure how often visitors who saw a section also clicked through. - Comparing pages. Same section name across multiple pages → query by section to compare viewership across your blog posts, landing pages, etc.
Gotchas
- Fires once per session per section name. If two elements share the same name, only the first one to scroll into view fires the event.
- Section names are not validated. Pick a consistent snake_case scheme (
pricing_table, notPricing Tableorpricing-table) so dashboards aggregate cleanly. - Hero / above-the-fold sections will fire for almost every visitor — usually not worth tracking. Mark sections where the answer to “did they see this?” isn’t obviously yes.
- Each marked section costs one event per visitor session against your monthly quota. Be deliberate about which sections you tag.
Related
- Engagement — section views sit alongside visible-time and bounce as a third engagement signal.
- Data attributes — click-based equivalent for measuring interactions, not viewability.
- Funnels — combine
section_viewedwith downstream events to measure conversion from view to action.