Embedding and attributes
The snippet
<script>window.Rawrrr=window.Rawrrr||{q:[],log:function(){this.q.push(["log",[].slice.call(arguments),Date.now()])},setContext:function(){this.q.push(["setContext",[].slice.call(arguments),Date.now()])}};</script>
<script src="https://rawrrr.zengarden.space/rawrrr.js" data-project="prj_xxxxx" defer></script>
Paste both lines before </body> or in <head>. The dashboard shows your exact snippet with your project id. The first line is a tiny stub that lets your app call Rawrrr.log() and Rawrrr.setContext() before the widget has loaded; it costs nothing if rawrrr never loads. See Describing what users do.
The widget is a single self-contained file (under 60 KB gzipped) that renders in a Shadow DOM, so it neither inherits your styles nor leaks its own. It never throws into your page, follows light and dark mode, works at phone width and is usable by keyboard and screen reader.
Attributes
| Attribute | Meaning |
|---|---|
data-project | Required. The project's public id. It is not a secret: origin checks protect it. |
data-app-version | Optional. A version string attached to every report, for example your build number. |
data-position | Optional. Overrides the corner chosen in the project's Look settings. |
Everything else (AI helpers, masking, texts, colours, consent text) comes from the project's settings in the dashboard and is fetched when the widget loads. Change a setting and every site picks it up.
Origin checks
Every call carries the project id, and the page's origin (and path prefix) must match one of the project's sites. Another site cannot use your id. If the widget says nothing happens, check that the site URL in the project matches the page, including https and any path prefix.
The tiger button
A pixel tiger, 32 px in a 44 px tap target, bottom-right. It blinks now and then, yawns once per visit and bites on click. All motion stops when the visitor prefers reduced motion. An orange dot and an ear twitch show that one of the visitor's tickets has news. It is left out of screenshots. Projects can choose a calmer variant without the yawn, or a plain text label.
Single-page apps
Load the script once. Call Rawrrr.setAppVersion, Rawrrr.setContext and Rawrrr.log when your app state changes.
Content Security Policy
If your site sets a CSP, allow the script and the API on https://rawrrr.zengarden.space (script-src and connect-src).