SDK reference
Field-by-field reference for @siteqwality/rum, the browser SDK for RUM, error tracking and session replay. This page describes SDK 2.3.2. For a first install, follow the RUM quickstart.
SDK 1.x is retired: its endpoints accept no data, and its CDN paths (/rum/v1/ and the pinned 1.x releases) are removed. Install SDK 2 as described below.
Install
Section titled “Install”npm install @siteqwality/rumRelease channels:
| Channel | Availability |
|---|---|
npm @siteqwality/, latest | SDK 2.3.2. |
CDN /rum/ | Moving 2.x alias, pointing to SDK 2.3.2. |
CDN /rum/ | Immutable SDK 2.3.2 and matching lazy chunks. |
Use the application’s public applicationId and clientToken, never an account API key. npm integrates with your bundler; the CDN exposes window.SiteQwalityRUM.
import { SiteQwalityRUM } from '@siteqwality/rum';
SiteQwalityRUM.init({ applicationId: 'YOUR_APPLICATION_ID', clientToken: 'YOUR_CLIENT_TOKEN', service: 'web', env: 'production', version: '1.4.2', // Your application release, not the SDK version.});Call init before mounting your app. Collection starts synchronously: the session, the collectors and the first page view are running before init returns. It then fetches the config and returns a promise that settles once the config is applied or has failed, with a 3-second timeout. The promise never rejects, and you do not need to await it. A second init is ignored. Without an applicationId and a clientToken, init logs a console warning and does nothing. No public method throws.
On a site that needs consent first, add trackingConsent: 'pending' to init in either snippet: nothing is sent until you call SiteQwalityRUM.setTrackingConsent('granted'). See consent.
CDN snippet
Section titled “CDN snippet”This snippet loads the moving 2.x CDN alias. Use /rum/v2.3.2/sdk.min.js to pin a release. Authorize the inline bootstrap using your site’s CSP nonce or hash; see CSP and endpoint configuration.
<script> (function(w,d,s,u){var r=w.SiteQwalityRUM=w.SiteQwalityRUM||{_q:[]};if(r._q&&!r._h){ ['init','setUser','clearUser','setGlobalAttribute','removeGlobalAttribute', 'addError','addAction','setView','setTrackingConsent','optOut','optIn', 'isOptedOut','startReplay','stopReplay','getSessionUrl','getStatus'].forEach(function(m){ r[m]=function(){r._q.push([m,arguments])}}); r._h=function(e){r._q.push(['_e',[e]])};w.addEventListener('error',r._h); w.addEventListener('unhandledrejection',r._h); var e=d.createElement(s);e.async=1;e.src=u;(d.head||d.documentElement).appendChild(e)} })(window,document,'script','https://cdn.siteqwality.com/rum/v2/sdk.min.js');
SiteQwalityRUM.init({ applicationId: 'YOUR_APPLICATION_ID', clientToken: 'YOUR_CLIENT_TOKEN' });</script>The stub queues all 16 public methods and the errors the page throws before the SDK arrives. When the bundle loads it runs init first, then the other calls in order, and reports the early errors with their original times. If init has not run yet (for example, it waits for consent), the SDK keeps up to 100 page errors until it does. A queued getter has no synchronous return value; call getStatus, getSessionUrl and isOptedOut after the real SDK loads when you need their results.
The bundle is a classic script whose only global is window.SiteQwalityRUM; it also works when loaded with type="module", and a second copy of it does nothing. Immutable releases use /rum/v<version>/sdk.min.js. Keep the matching recorder-<version>.min.js, gzip-<version>.min.js and canvas-<version>.min.js beside the core when self-hosting. The canvas chunk loads only when canvas recording is opted in and permitted. The gzip fallback loads only when native compression is unavailable.
Endpoints and config
Section titled “Endpoints and config”| Purpose | Endpoint | Authentication |
|---|---|---|
| Events | POST https://in.siteqwality.com/ | Authorization: Bearer <clientToken> |
| Identity check, when enabled | GET https://in.siteqwality.com/ | Same header; private/no-store response. The server also accepts POST. |
| Config | GET https://cdn.siteqwality.com/ | No token, cookies or custom headers |
| Replay | POST https://in-replay.siteqwality.com/ | Bearer header and x-sq-replay-index |
ingestBase, replayBase and configBase override those host bases for a first-party proxy. Do not include the endpoint path in the base. Preserve authentication as a header; never put a client token in the URL. See the proxy requirements.
The SDK fetches its config at init, and an open tab fetches it again when it becomes visible with a copy older than five minutes. Config is cached under _sq_cfg_<applicationId> in localStorage when consent is granted. Until config arrives, the SDK uses the cached config or safe defaults: Observe sample rate 1, no Analyze or Replay rules, Balanced privacy, masked inputs and GPC honored. A failed refresh keeps the previous config. An application whose config says "status": "paused", as a deleted application’s does, sends nothing. Set pending consent in init when required, because the remote config may arrive after initial collection. What the config holds and how fast changes land is on Change SDK behavior without redeploying.
Init options
Section titled “Init options”| Option | Default | Effect |
|---|---|---|
applicationId, clientToken | Required | The application’s public credentials. |
service, env, version | None | Sent in batch context; version identifies your application release and selects source maps. |
trackingConsent | granted, unless the application requires consent | pending, granted or not-granted. Pass explicitly for consent-gated sites. See consent. |
persistence | cookie | Where the session lives: cookie (shared by tabs), localStorage or memory (this page load only, nothing stored). |
cookieDomain | Current host | Share the session cookie across your subdomains, such as example.com. Any nonempty value disables canvas capture. |
hashRouting | false | Treat #/ and #!/ fragments as page views. |
routeName(path) | None | Return a route label such as /users/. |
allowedQueryParams, deniedQueryParams | None | Query parameters kept on captured URLs, or always removed. A built-in deny list (token, code, key, secret, password, email, session, sig, auth, apikey and similar) applies even to allowed names. |
ignoreErrors, denyUrls | None | String or RegExp lists for error messages and top-frame URLs. See error filtering. |
beforeSend(event, kind) | None | Synchronous hook for error, view, action, custom, network and console events. |
ingestBase, replayBase, configBase | Hosts above | First-party proxy bases. |
recorderUrl | Next to the CDN core | CDN bundle only: where to load the replay recorder from. Keep its gzip fallback and canvas chunk beside it. The npm package bundles the recorder through your bundler and ignores this option. |
debug | false | Log config, recording decisions and transport outcomes to the console. Adding ? to a page URL turns it on in that browser until you remove the sq_debug key from localStorage. |
Public methods
Section titled “Public methods”| Method | Behavior |
|---|---|
init(options) | Start the SDK. See install. |
setUser({id, email, name, traits}), clearUser() | Set or clear identity for later batches. id, email and name take strings or numbers, cut to 1,024 characters; traits takes up to 20 string values. Each call replaces the previous user. The email is sent only when the application captures user emails, and no identity is sent under honored GPC. |
setGlobalAttribute(key, value), removeGlobalAttribute(key) | Attach string labels to batch context, including page views. Up to 50 keys of up to 128 characters, values cut to 1,024 characters, 4 KB in all; anything else is ignored. |
addError(error, context) | Capture any value through the error filters. context takes up to 50 string values; context['sq.fingerprint'] sets a custom fingerprint. |
addAction(name, context) | Record a custom event (Observe), even without an Analyze rule match. The name is cut to 256 characters. |
setView(name) | Name the current view’s route. |
setTrackingConsent(consent) | Change consent for this page. |
optOut(), optIn(), isOptedOut() | Persist or read browser opt-out. These work before init. |
startReplay({force}), stopReplay() | Start or stop replay. force: true bypasses sampling, not consent, privacy or quota. |
getSessionUrl({atCurrentTime}) | Get an internal session link, optionally with ?. Viewers still need account access. |
getStatus() | Inspect SDK version, session/window IDs, consent, sampling, recording state, config revision and drop counters. |
With npm, other calls before init are ignored. The CDN snippet queues them instead.
beforeSend may return false or null to drop an event, an object to replace it, or nothing to retain in-place edits. Views cannot be dropped. The SDK limits edits to existing fields of the same type, never changes k, t, view_id, id, seq or final, and sanitizes modified values again (URLs, stacks, text and nested fields). An error’s error_key is recomputed from your edits. The hook must return synchronously; if it throws, the original event is sent. Error events carry message, stack and error_type.
Exported types
Section titled “Exported types”import type { InitOptions, // init argument UserContext, // setUser argument SdkStatus, // getStatus result SqEvent, // the event beforeSend receives SqEventKind, // its kind: 'error', 'view', 'action', 'custom', 'network' or 'console' Consent, // 'granted', 'pending' or 'not-granted'} from '@siteqwality/rum';What is collected when
Section titled “What is collected when”| Data | Tier |
|---|---|
Page views (view_start, view_end) with load timing, Web Vitals, time spent, active time, scroll depth and counts | Observe |
| Errors that pass filtering, with stack, causes, breadcrumbs and Debug IDs | Observe |
Failed requests (status 0, 4xx or 5xx) | Observe |
| Clicks and taps with a frustration signal | Observe |
Custom events from addAction | Observe |
| Other clicks and taps, field changes and form submits (names only, never values) | Analyze |
| Successful fetch and XHR requests | Analyze |
| Resource timings | Analyze |
| Console entries at the application’s configured levels | Analyze |
| Long animation frames, or long tasks where the browser lacks them | Analyze |
| DOM snapshots and mutations | Replay |
Observe data is sent for every session that falls within the application’s Observe sample rate. Analyze data is sent once a recording rule matches the session; until then it waits in a memory buffer of up to 60 seconds or 500 events, sent on a match and discarded otherwise. Under honored GPC, for a do-not-record user and on never-record URLs, nothing Analyze is sent.
Repeats are folded. After the first of each request (method, URL and status) on a page view, repeats are sent as one row per 30 seconds with a count and percentiles. The first 150 resources of the initial view and the LCP resource are sent one by one, later ones aggregated per page view and origin every 30 seconds. Console entries are limited to 50 per level every 10 seconds, with identical consecutive lines folded, and long animation frames to 200 per page load. The SDK never records its own requests, and skips resource timings that match the application’s excluded resources.
Capture and billing
Section titled “Capture and billing”Accepted errors count toward Observe sessions. An error alone does not make the session Analyze. Filtered browser noise does not claim usage. A recording rule triggered by that error can still activate Analyze or Replay and incur those session counts when data is accepted.
| Tier | Capture and usage |
|---|---|
| Observe | Views, vitals, accepted errors, failed requests, frustration signals and custom events for sampled sessions. Default Observe sampling is 100%. |
| Analyze | Accepted detail such as actions, successful requests, resources, console and long animation frames after a rule match. |
| Replay | A Replay rule also enables Analyze. The first accepted replay segment counts the session toward Replay; retries do not add a new replay session. An unmatched memory buffer alone is not a billed replay. |
Allowances and prices are on the pricing page.
Error filtering
Section titled “Error filtering”The SDK captures error and unhandledrejection events and addError calls. Every error passes these steps in order, and only an error that survives all of them is sent:
- Browser noise. After trimming the message and removing one leading
Uncaught, the SDK drops ResizeObserver loop warnings,Script error.with no stack frames (a cross-origin error the browser hides), errors whose stack frames all come from browser extensions (chrome-extension:,moz-extension:,safari-extension:,safari-web-extension:,webkit-masked-url:orms-browser-extension:; with no frames, the file name is checked), and a short list of known third-party noise such asJava object is gone. - Ignore lists.
ignoreErrorsstrings match as case-sensitive substrings, and a RegExp is tested. The application’scapture.errors.ignorepatterns are a case-sensitive substring or a/regex/(/…/iignores case). Both are tried against the message and againstType: message. - Deny lists.
denyUrlsdrops errors whose top stack frame URL (or, without frames, the file name) matches. The application’scapture.errors.deny_urlsis applied in the browser only when the top frame is surely your own code (same origin, a relative or bundler path, and notnode_modules); ingest applies it to the top in-app frame. - Suppressed issues. Errors whose
error_keybelongs to an issue you suppressed are dropped. - Limits. A page load sends at most 500 errors. Identical errors (same key, message and stack) within 5 seconds are sent once more as one event with a
repeatcount. Each error key may send 10 errors, then one more every 10 seconds. beforeSend(event, 'error'). Drop, replace or edit the error, as described under public methods.
SiteQwalityRUM.init({ applicationId: 'YOUR_APPLICATION_ID', clientToken: 'YOUR_CLIENT_TOKEN', ignoreErrors: ['Request aborted', /Loading chunk \d+ failed/], denyUrls: [/\/vendor\/chat-widget\.js/], beforeSend(event, kind) { if (kind === 'error' && String(event.message).includes('third-party-widget')) return false; },});Ingest applies the same browser-noise rules and the application’s ignore, deny and suppression lists again. A dropped error is never billed, never marks the session as errored, and never triggers an error recording rule or an error click. getStatus().dropped counts what each step dropped.
Each sent error carries the page URL, its type, message and stack, up to three cause levels, the last 30 breadcrumbs (clicks, navigations, failed requests and console errors), the Debug IDs of bundles injected with the source-map CLI, and an error_key that groups the error across deploys and browsers. With console errors as issues on, console.error calls become errors too.
Click names
Section titled “Click names”Clicks, taps, field changes and form submits are recorded as action events. A click is attributed to the nearest link, button, role="button" or role="link" element, form control, label, summary or element with data-sq-action-name at or above the click target; otherwise to the target itself. A click on an icon inside a button is therefore named and grouped as the button. Each action has two names:
| Field | Built from |
|---|---|
name | data-sq-action-name on the element or an ancestor; else its aria-label; for a form field, its label, name or id; else the element’s text. Whitespace is collapsed and the result cut to 64 characters. Field values are never recorded. |
selector | Walking up at most four levels: an id, else a data-testid or other data-sq-* attribute, else the tag and up to two classes, such as form#checkout > button.primary. Generated class names (css-…, sc-…, names with runs of digits) are skipped. |
Both are scrubbed with the application’s personal data patterns. The name can still contain what your users typed or see, such as names or message previews. Two ways to keep it out:
- Set
data-sq-action-nameon the element to give it a fixed name:<button data-sq-action-name="Send message">. The value is trimmed, cut to 64 characters, and its square brackets become parentheses. - Turn on hiding element text in click names. The SDK then sends the
data-sq-action-namevalue or the selector as the name, and ingest stores the selector only.
Frustration signals
Section titled “Frustration signals”A click carries at most one frustration signal, in this order of precedence: error_click, then rage_click, then dead_click. Clicks with a signal are Observe data; other clicks need Analyze.
| Signal | When |
|---|---|
error_click | An error is sent (after filtering) within 1 second after the click. The latest pending click gets it. |
rage_click | The third click on the same element within 1 second. A burst continues while clicks keep coming within 1 second and gets one rage click in all, with the burst’s size in click_count. |
dead_click | A click on a link with href, an enabled button, a role="button" or role="link" element, an input of type button, submit or reset, a summary, or an element with onclick, after which nothing reacts for 1 second: no DOM change, no history change, no request, no focus moved elsewhere, no form submit and no navigation away. Clicks with a modifier key, on a[download], or on a link with a target other than _self never count. |
A reaction to the press (a menu that opens on pointerdown) counts for its click. A verdict that arrives late because the page was blocked, by an alert or heavy work, counts as a reaction.
To exempt an element from rage and dead clicks, add the data-sq-no-frustration attribute to it or an ancestor, or list a matching CSS selector in the application’s frustration ignore selectors. Error clicks still apply.
A click event is sent when its 1 second window closes, or at once, with no dead click, when the tab is hidden or the page closes.
Page views and Web Vitals
Section titled “Page views and Web Vitals”- A
view_startis recorded atinit, when the URL changes throughpushState,replaceState,popstateorhashchange, on a back-forward cache restore, and when a new session starts on an open page. A change to an anchor on the same page is not a new view. - URLs are minimized before they are sent: fragments and query strings are removed (see
allowedQueryParams), and so are credentials. WithhashRouting: true, a#/pathor#!/pathfragment is kept like a path, unless it carries=or&(such as#/access_token=...). - Each view carries
loading_type:initial_load,route_changeorbfcache_restore, and anavigation_type. Itsroutecomes fromrouteNameorsetView. - The first view of a session carries its referrer (
""for a direct visit), UTM parameters and the type of ad click ID (gclid,fbclid,msclkidorttclid). - A
view_endis sent when the tab is hidden and every 5 minutes while it is visible, and a final one on the next view and when the page closes. It carries time spent, active time (each input counts the 5 seconds after it, while the tab is visible), scroll depth, the view’s error, action and frustration counts, and its timings. - The initial view’s load timing comes from Navigation Timing:
loading_time_msandload_event_ms(loadEventEnd) anddom_content_loaded_ms. A route change’sloading_time_msruns until 100 ms pass with no new request or DOM change, at most 10 seconds. - Web Vitals belong to the document’s initial view:
lcp_ms,fcp_ms,cls,inp_msandttfb_ms, with attribution: the LCP element, its resource and its load delay, load time and render delay; the element that shifted most; and the INP target, event type, input delay, processing, presentation and longest script. LCP is final at the first key press or click, or when the tab is hidden; CLS and INP are reported when the tab is hidden. A vital that arrives after the initial view ended goes out in one more finalview_end.
Sessions
Section titled “Sessions”| Behavior | Value |
|---|---|
| Storage | First-party cookie _sq_s (path /, SameSite=Lax, Secure on HTTPS), shared by every tab. Falls back to localStorage, then memory, when cookies fail. persistence changes this. |
| Session ID | A UUIDv7. |
| Window | _sq_w in sessionStorage identifies a tab. A duplicated tab gets a new window ID. |
| Activity | User input (pointer down, key down, touch start or scroll; written at most every 5 seconds), the tab becoming visible and a new page view. Events the SDK sends on its own never count. |
| Expiry | After 15 minutes without activity, or 4 hours in all, a new session starts. |
| Rotation | Checked on the next activity or event. The new session starts with a fresh page view for the current URL (route_change); Analyze and replay start over and rules are evaluated again. |
| Consent pending | The session lives in memory and nothing is stored. |
| Cookieless or honored GPC | The session lives in sessionStorage, one per tab, with no anonymous ID. |
| Anonymous visitor ID | _sq_aid in localStorage, kept 13 months, set only with consent granted and without GPC, cookieless mode or memory persistence. |
Withdrawing consent removes every key the SDK stores except the opt-out (_sq_optout).
Rule evaluation
Section titled “Rule evaluation”Recording rules arrive with the config and are evaluated in the browser, when the config is applied and synchronously on every input: a page view’s URL, an addAction event, a sent error, a failed request, a frustration signal, a Web Vital, setUser with an id, and a global attribute or user trait. Inputs are kept for the session (up to 200), so a rule that arrives later still sees what already happened.
- Sampling is per session and per rule, and deterministic: a hash of the session ID and rule ID, so every tab and page load of a session gets the same answer. The Observe sample rate works the same way.
- Conditions latch: a rule matches once each of its conditions has held at some point in the session. The
device(mobile or desktop, from the user agent),release(version) andenvconditions are known atinit. - Gates delay the decision, not the match.
min_duration_mscounts from the session’s start;require_interactionwaits for a pointer down, touch or key press (scrolling does not count). A rule with anerrorcondition skips both gates. - The decision latches for the session. Once Analyze or replay turns on, it stays on in every tab and across page loads, shared through the session record (
_sq_s).getStatus().sampledshows it, with therule_idthat started replay, or else Analyze.
Batching and delivery
Section titled “Batching and delivery”The SDK sends one event stream, POST {ingestBase}/v2/batch. A batch holds the events of one session and page load, up to 500 events or about 900,000 characters, as {v, sent_at, sdk, ctx, events}.
- A batch flushes every 10 seconds, at 200 queued events, and within 1 second of an error. When the tab is hidden, everything queued goes at once; at page close, what is left goes as a keepalive tail, uncompressed, within a 60 KB keepalive budget. Anything over that budget is dropped and counted.
- Bodies of 1 KB or more are gzipped with
CompressionStreamand sent asapplication/octet-stream; smaller ones, and browsers without compression, sendapplication/json. Every batch carries theAuthorizationheader and omits cookies. - One request is in flight at a time. While the tab is hidden, sends are at least 5 seconds apart.
- A batch that fails with a network error,
408,429or5xxis kept and retried with jittered exponential backoff from 2 seconds to 5 minutes. ARetry-Afterheader (honored up to a day) holds every send, at tab hide and page close too. A401or403stops sending for the rest of the page, replay included, and any other4xxdrops the batch. - The queue holds up to 1,000 events, and 200 while consent is pending, dropping the oldest past that.
- A hard request budget caps the SDK whatever the cause: 5,000 requests and 100 MB per session (10,000 and 200 MB per page load) for events, config and identity checks, and separately 2,500 requests and 250 MB per session (5,000 and 500 MB per page load) for replay. Past a ceiling the SDK stops sending (only replay, when it is replay’s), says so once in the console and in
getStatus()(reasonrequest_budgetorreplay_budget), and resumes in a new session. A page-load ceiling holds until the next page load.
Replay recording
Section titled “Replay recording”The replay recorder (rrweb 2.1.4) is a separate chunk. The npm package leaves it to your bundler to split out; the CDN bundle loads recorder-<version>.min.js from beside sdk.min.js, or from recorderUrl. It is downloaded only when a Replay rule has matched, could still match the session (it is sampled in, and its device, release and environment conditions hold) or startReplay() was called, and recording is permitted: consent granted, no honored GPC, no opt-out and no do-not-record user.
- Before a match, the recorder buffers in memory, as described under replay buffer and privacy. A match sends the buffer, then segments stream as they close.
- Every tab records its own window, and each page load is its own stream, numbered from 0.
- Recording pauses while the tab is hidden, after five minutes without input, and on never-record URLs, and resumes with a full snapshot. Recording never outlasts its session.
- While streaming, a fresh full snapshot is taken about every 3 minutes, so seeking stays fast.
- Privacy comes from the application’s config, not from
init. A config refresh that changes privacy or capture settings restarts recording from a fresh snapshot. getStatus().recordingisoff,buffering,recording,pausedorstopped, with areasonsuch asnot_sampled,consent,privacy_url,too_largeorstopped_by_api.
Replay transport
Section titled “Replay transport”The fixed endpoint is POST /v2/segments, with no segment-specific query string. Index fields go in the x-sq-replay-index header as a URL-encoded query-string value, for example:
Authorization: Bearer <clientToken>x-sq-replay-index: s=<session-uuid>&w=<window-uuid>&p=<page-load-uuid>&q=0&ft=<first-epoch-ms><=<last-epoch-ms>&n=<event-count>&fs=1&v=<sdk-version>s, w, p, q, ft, lt and n identify the stream, sequence and event range. Optional fs=1 marks a full snapshot, fin=1 a best-effort final segment, and r the URL-encoded rule ID. Sequence numbers start at zero per session/page-load stream and continue across recorder restarts within that stream.
Send exactly one index header, at most 2,048 bytes. Intake also accepts the index as URL query parameters instead of the header, but rejects a request that sends both.
The body is a JSON array of rrweb events. Gzip uses Content-Type: application/octet-stream; uncompressed fallback uses application/json. The intake detects gzip from the body. No client If-None-Match header is needed.
Segments normally close at 20 seconds or about 2.5 MB of serialized JSON, and on tab hide. The first full snapshot is sent promptly. A snapshot larger than 4 MB after stylesheet references stops recording for that page load (too_large). These are SDK segmentation thresholds, not intake limits: intake allows at most 2 MB on the wire and 16 MB inflated.
Requests are sent in order, one at a time. Network errors, 408, ordinary 429 responses and 5xx retry with backoff; Retry-After holds sends, including unload. The SDK distinguishes two explicit response reasons: a 403 with reason: "not_enabled" stops replay for the page load while Observe and Analyze continue, and a 429 with reason: "session_cap" stops replay for that session. Other 401 or 403 responses and an exhausted request budget stop delivery. Other 4xx responses drop a segment. A missing snapshot also drops dependent segments and requests a fresh snapshot. Identical retry bodies are deduplicated by intake.
At page close, the SDK attempts a keepalive tail using already-compressed bytes or JSON within the shared 60 KB keepalive budget. Delivery and the final marker are best-effort. Inspect getStatus().dropped, including replay_tail_dropped and replay_segments_dropped, rather than assuming every closing event arrived.
Replay buffer and privacy
Section titled “Replay buffer and privacy”Before a match, the recorder keeps the current and previous full-snapshot intervals in memory, with snapshots about 60 seconds apart and a 5 MB buffer target. A match sends retained segments oldest first, then streams new recording.
This can include roughly 60 to 120 seconds before a later error. It does not guarantee a minute of history: a fresh page, delayed config or consent, a pause, memory pressure or a large snapshot may leave less. Nothing from an unmatched replay buffer is uploaded or persisted. It is discarded on page close, stop, consent withdrawal, opt-out, GPC restrictions or a do-not-record decision.
| Privacy mode | Behavior |
|---|---|
| Strict | Masks page text except configured unmask selectors, masks inputs and blocks media. Block selectors always win. |
| Balanced | Masks inputs; page text is visible with configured PII patterns scrubbed. Default patterns cover emails, card-like numbers and long digit runs. |
| Relaxed | Masks inputs; ordinary page text is visible and default text PII patterns are empty. |
| Custom | Uses the stored mask_inputs and mask_text flags. Review them explicitly; an application created before privacy levels can have input masking disabled. |
Password, email and telephone inputs remain masked; hidden inputs are excluded. When input masking is off, credit-card autocomplete fields are blocked. URLs in page metadata, DOM attributes and CSS are minimized. Canvas recording is off by default. SDK 2.2.0 and later support opt-in canvas capture outside Strict privacy, at up to 2 fps and a 20 MB serialized-frame budget per session; DOM replay continues after that budget is reached. A nonempty cookieDomain disables canvas. Iframe document content is not captured by this recorder. Stylesheet references can avoid resending acknowledged CSS; images and fonts still depend on their asset URLs.
Pointer, scroll and media sampling plus mutation throttling mean replay does not preserve every intermediate DOM state. Heavy mutation bursts can leave marked gaps and require a fresh snapshot.
Consent and browser signals
Section titled “Consent and browser signals”pending: telemetry waits in a bounded memory queue of up to 200 events; no telemetry uploads or persistent session state. Replay recording does not start. The public config may still be fetched.granted: the held telemetry can be flushed, session persistence follows the configured mode, and eligible replay recording can start.not-granted: discard queued data, stop replay and clear session/config state.optOut(): stop sending and remember the preference in_sq_optout;optIn()permits collection again subject to consent and config. An opt-out in one tab applies to the others at once.- Honored GPC: no Analyze, replay, anonymous visitor ID or supplied user identity; Observe can continue using a cookieless session in sessionStorage (or memory when storage is unavailable). This is not a promise of zero requests or zero technical identifiers.
Consent set by init or setTrackingConsent is never overridden by the application’s config. For dashboard deletion, do-not-record and retention controls, see privacy requests. Changing consent controls future collection; it does not erase data already uploaded.
Verify an installation
Section titled “Verify an installation”- Confirm that your application is active in its public config:
https://cdn.siteqwality.com/rum/config/v2/<applicationId>.jsonreturns"status": "active". - Update CSP to allow the SDK’s hosts.
- Choose consent explicitly and review the stored privacy config before testing a replay.
- Verify the config GET, event POST and replay preflight in browser Network tools. A successful config GET alone does not prove ingestion or playback.
- Check
getStatus()and a real session in the dashboard, including an accepted replay and its playback, before expanding traffic.