For developers

Install the Tirs SDK

Add the Tirs SDK to your site so customer care links capture console and network logs automatically.

آخر تحديث ١٧‏/٠٨‏/٢٠٢٦

The Tirs SDK is a small script you add to your own site. On its own, a customer care link records the customer's screen — with the SDK installed, the recording also carries their console logs, network requests and environment, exactly like a session captured by the extension. It stays dormant until a capture starts, and sensitive values in the captured logs are redacted by default.

Install with a script tag

The fastest way in: drop the two loader tags at the top of head — before your own bundles — on every page you want covered.

1<script
2 src="https://cdn.tirs.dev/v1/capture.js"
3 data-tirs-key="YOUR_SDK_KEY"
4></script>
5<script
6 src="https://cdn.tirs.dev/v1/recorder.js"
7 defer
8></script>

Get your key and install snippet in the web app under Development tools → Tirs SDKs. The scripts are a few kilobytes; capture.js loads first, synchronously — it has to patch fetch before your bundles run — and does nothing until a Tirs capture is active on the page.

Install from npm

If you bundle your frontend, install the packages instead:

1npm install @tirs/core @tirs/care @tirs/recorder
2# or
3pnpm add @tirs/core @tirs/care @tirs/recorder

Then initialize it once, as early as possible in your app's lifecycle:

1import { init } from '@tirs/core'
2import { care } from '@tirs/care'
3import { mountRecorder } from '@tirs/recorder'
4
5const tirs = init({ key: 'YOUR_SDK_KEY', plugins: [care()] })
6mountRecorder(tirs)

Tune what gets captured

Capture is careful by default — PII redaction is on, and you can keep request and response bodies for sensitive endpoints out of the capture, or hold on to the seconds from before the customer hit record:

1import { init } from '@tirs/core'
2import { care } from '@tirs/care'
3
4init({
5 key: 'YOUR-KEY',
6 plugins: [care()],
7 redact: true, // PII redaction of captured logs — on by default
8 preroll: 5000, // keep the last 5s of console + network from before recording started
9 denyUrls: [/\/auth\//], // never capture request/response bodies for matching URLs
10})

Verify the install

  1. Mint a customer care link for your verified domain and open it — it opens your own site with the recorder attached.
  2. Start a recording and perform any action.
  3. Open the session in app.tirs.dev — the Console and Network tabs should be filled in.

Next steps

With the SDK live, customer care links get the full technical story too — see "Customer care links".