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
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.

markup
<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:

PropertyExampleNotes
sectionpricing_tableThe exact value of the data-clamp-section attribute.
pathname/pricingThe 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.

Custom threshold
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

Gotchas