Capture

The Behavior SDK: one tag that records how your real visitors use your product — behaviour, never content — so the simulated people run on their devices and take their routes.

What is captured

The Behavior SDK collects behaviour, not content: enough to recreate how a product was used, never enough to recreate the person. It records the routes visitors take (with ids collapsed, so /orders/482913 is /orders/:id), the controls they press and the forms they submit (as a structural key and a role, never the label or the value), the rhythm of it (time between actions, hesitation before a press, how long a field took, how many deletions and pastes — never what was typed), the device, browser, OS and viewport class, the goals you name, the release and feature flags in force, and client errors with anything that could identify a person or a record removed. No screenshots, no DOM, no text, no field values, no full URLs, no identity.

That is exactly what a simulation needs: the devices your visitors really use become the devices the simulated people run on; the routes they really take become journeys; how they behave shapes the people in a UX run. It is also what your visitors would accept: there is nothing in it to leak.

The tag cannot break your page. Every entry point is wrapped, every failure is swallowed, nothing polls and nothing blocks navigation or submission; events leave in small batches in idle moments and with a beacon on unload. Sessions driven by Simulithic's own simulated people are recognised at the source and kept out of your numbers, so running simulations against a captured product never pollutes what you learn from real visitors.

The tag and its settings

One line, once, before </body>on every page (or in your app's web layer). It comes filled in under Setup in the Studio, and a connected coding agent gets it from the capture_snippet tool with the right place for your framework.

HTML
<script src="https://app.simulithic.com/v1.js" data-project="ws_xxxxxx"></script>
AttributeWhat it does
data-projectYour workspace id. The only required attribute; events are accepted only from the origins you allow under Settings.
data-consent"required" collects nothing until your consent banner calls Simulithic.setConsent("granted"). Default: granted.
data-releaseThe release (a git sha, a version) sessions are attributed to, so a behaviour change can be tied to a deploy.
data-endpointWhere events go. Normally left out: the SDK posts to the origin it was loaded from.

And one attribute you may put on your own elements:

AttributeWhat it does
data-simulithic-idA stable name for a control or a form, so its key survives redesigns. Without it, a key is derived from the element’s position and role.

Sampling, excluded routes and whether input behaviour is summarised are set per workspace on the server, so you can change them without a deploy.

Telling it more

The tag exposes window.Simulithic. Everything is optional; everything is coarse by design.

JavaScript
Simulithic.goal("checkout_completed");          // a named outcome: journeys ending here are the ones that matter
Simulithic.context({ plan: "team", region: "eu" }); // coarse context (keys that look like email, name or phone are refused)
Simulithic.flags({ new_checkout: true });       // feature flags in force, so behaviour can be compared across them
Simulithic.release("a1b2c3d");                  // the same as data-release, from code
Simulithic.setConsent("granted");               // with data-consent="required": start collecting

Goals matter most: a route sequence that ends in a goal is a journey with a known success, and the check can judge the simulated people against it.

Privacy

Behaviour-only is the only mode. There is no replay, no text and no values to mask, because none of it is collected; what you don't capture can never be recovered later. Error messages are the one free-text field, and emails, ids, long tokens, numbers and URLs are removed from them in the visitor's browser before they leave the page.

How long captured data is kept, and how to have it deleted, is set out in the privacy policy.

Single-page apps and frameworks

Route changes in single-page apps are page views (with the time spent on the route before). The tag works as a plain script tag or through your framework's script component; put it in the root layout so it is on every page.

Next.js — app/layout.tsx
import Script from "next/script";

<Script src="https://app.simulithic.com/v1.js" data-project="ws_xxxxxx" strategy="afterInteractive" />

Mobile and desktop apps install the same tag in their web layer. A native SDK that sends the same events from a React Native app is in early access; ask us for it.