Loopdocs

Getting started

Ten minutes to a closed loop

Install teaches you the whole surface. This is the shortest path through it: a key, a snippet, one event you chose yourself, and a guide shipped to the people it happened to.

1. Take a write key

A wk_live_ key from Settings. It ships in your page's HTML and it is public by design; the origin allowlist is what protects it, not secrecy.

2. Paste the snippet

One script tag in your head, or npm install and init({ key }). Both run the same lifecycle, so neither can behave differently from the other.

Use init(), not a bare new Loop({ key }).

The constructor queues events and never sends them; nothing in the class calls send(). init() runs the lifecycle: pageview, autocapture, guides, the flush timer, and a flush on the way out.

3. Send one event you chose

Autocapture gives you $pageview and $autocapture for free, and they are useful. But the loop closes on an event that means something to your business: checkout_started, invited_teammate, connected_data. Send one, by name, from the place it actually happens.

4. Confirm it arrived

GET /v1/events/health answers in one request, and Data → Events shows the row with its properties. If it is quiet, loop.debug() in the browser console tells you which of the five usual causes it is without touching the network.

5. Ship one guide

A banner or a checklist, aimed at a segment, live in your product without a deploy. That is the loop closed: something happened, you saw it, and you acted on it in the same system.

Where the ten minutes actually goes.

About two of them are the snippet. The rest is deciding which event is worth naming, which is the part that pays off later, and the part no SDK can do for you.