What the SDK masks by default and how to control exactly what is recorded.
All masking happens client-side, inside the recorder, while the DOM is being serialized. Masked or blocked content never leaves the user’s browser: it is not captured, buffered, or sent in any form.
Masked input values are replaced with asterisks in the recording. Everything else, including other input fields and page text, is recorded as-is unless you configure otherwise.
The SDK does not automatically detect and mask sensitive text that appears outside those input types, such as credit card numbers rendered in page content. If your product displays sensitive data, mask or block those elements explicitly using the classes and selectors below.
Three classes are honored by default. Add them directly in your markup, no SDK configuration needed:
Class
Effect
replay-mask
The element’s text is masked (replaced with asterisks). Layout and structure are still recorded.
replay-block
The element is not recorded at all. A placeholder of the same dimensions appears in the replay.
replay-ignore
Input events on the element are ignored. The element itself is still visible in the replay.
<!-- Text is masked but the element is visible --><div class="replay-mask">Account number: 12345678</div><!-- Entire element replaced by an empty placeholder --><div class="replay-block"> <iframe src="https://example.com/embedded-payment"></iframe></div><!-- Keystrokes not captured --><input class="replay-ignore" name="search" />
The class names themselves are configurable via maskTextClass, blockClass, and ignoreClass if you cannot use the defaults.
There is no automatic detection of credit card numbers, government IDs, or emails in page text. Mask those regions explicitly.
The SDK does not ship consent management. If you need user consent before recording, gate the init() call behind your own consent flow.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Observerbee Docs","colors":{"primary":"#EAB308","light":"#FDE047","dark":"#CA8A04"},"logo":{"light":"https://mintcdn.com/observerbee/hfdplA9icwRRCH4j/logo/light.svg?fit=max\u0026auto=format\u0026n=hfdplA9icwRRCH4j\u0026q=85\u0026s=69c013888e159d97449cd0431666a453","dark":"https://mintcdn.com/observerbee/hfdplA9icwRRCH4j/logo/dark.svg?fit=max\u0026auto=format\u0026n=hfdplA9icwRRCH4j\u0026q=85\u0026s=6ea99e5e05578d6bc1ddd128f3c18741"},"favicon":"https://mintcdn.com/observerbee/hfdplA9icwRRCH4j/favicon.svg?fit=max\u0026auto=format\u0026n=hfdplA9icwRRCH4j\u0026q=85\u0026s=83427adc0152445715325e5d86007bc0","navbar":{"links":[{"href":"mailto:support@observerbee.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.observerbee.com"}},"footer":{"socials":{"x":"https://x.com/observerbee","github":"https://github.com/observerbee"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"observerbee","hasAudioNarration":false,"actualSubdomain":"observerbee","customDomains":["docs.observerbee.com"],"gitSource":{"type":"github","owner":"web-analytics-ai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6aab98d90a7d768fd2caa423","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"Documentation","count":19},{"language":"default","tag":"Integrations","count":6},{"language":"default","tag":"Core Concepts","count":5},{"language":"default","tag":"SDK Reference","count":5},{"language":"default","tag":"Getting Started","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"sdk/privacy-masking","slug":"/sdk/privacy-masking","pageMetadata":{"title":"Privacy and masking","description":"What the SDK masks by default and how to control exactly what is recorded.","href":"/sdk/privacy-masking"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"What the SDK masks by default and how to control exactly what is recorded.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`All masking happens client-side, inside the recorder, while the DOM is being serialized. Masked or blocked content never leaves the user’s browser: it is not captured, buffered, or sent in any form.`}),`\n`,_jsx(Heading,{level:`2`,id:`what-is-masked-by-default`,children:`What is masked by default`}),`\n`,_jsx(_components.p,{children:`Out of the box, the SDK masks the contents of:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`\u003cinput type=\"password\">`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`\u003cinput type=\"email\">`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`\u003cinput type=\"tel\">`})}),`\n`]}),`\n`,_jsx(_components.p,{children:`Masked input values are replaced with asterisks in the recording. Everything else, including other input fields and page text, is recorded as-is unless you configure otherwise.`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`The SDK does not automatically detect and mask sensitive text that appears outside those input types, such as credit card numbers rendered in page content. If your product displays sensitive data, mask or block those elements explicitly using the classes and selectors below.`})}),`\n`,_jsx(Heading,{level:`2`,id:`mask-all-inputs`,children:`Mask all inputs`}),`\n`,_jsx(_components.p,{children:`For strict privacy, mask every input field regardless of type:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SessionRecorder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`init`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'ob_live_your_api_key_here'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maskAllInputs:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`This is off by default. We recommend enabling it unless you specifically need to see what users type.`}),`\n`,_jsx(Heading,{level:`2`,id:`controlling-elements-with-css-classes`,children:`Controlling elements with CSS classes`}),`\n`,_jsx(_components.p,{children:`Three classes are honored by default. Add them directly in your markup, no SDK configuration needed:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Class`}),_jsx(_components.th,{children:`Effect`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`replay-mask`})}),_jsx(_components.td,{children:`The element’s text is masked (replaced with asterisks). Layout and structure are still recorded.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`replay-block`})}),_jsx(_components.td,{children:`The element is not recorded at all. A placeholder of the same dimensions appears in the replay.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`replay-ignore`})}),_jsx(_components.td,{children:`Input events on the element are ignored. The element itself is still visible in the replay.`})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`html`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`\u003c!-- Text is masked but the element is visible -->`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` class`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"replay-mask\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Account number: 12345678`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`\u003c!-- Entire element replaced by an empty placeholder -->`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` class`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"replay-block\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`iframe`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` src`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/embedded-payment\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`iframe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`\u003c!-- Keystrokes not captured -->`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`input`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` class`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"replay-ignore\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"search\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The class names themselves are configurable via `,_jsx(_components.code,{children:`maskTextClass`}),`, `,_jsx(_components.code,{children:`blockClass`}),`, and `,_jsx(_components.code,{children:`ignoreClass`}),` if you cannot use the defaults.`]}),`\n`,_jsx(Heading,{level:`2`,id:`controlling-elements-with-css-selectors`,children:`Controlling elements with CSS selectors`}),`\n`,_jsx(_components.p,{children:`If you cannot add classes to your markup, target elements with selectors instead:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SessionRecorder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`init`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'ob_live_your_api_key_here'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maskTextSelector:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '[data-private], .account-balance'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` blockSelector:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'iframe, .third-party-widget'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ignoreSelector:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'input[name=\"coupon\"]'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Selectors and classes combine: an element matching either is treated accordingly.`}),`\n`,_jsx(Heading,{level:`2`,id:`choosing-between-mask-block-and-ignore`,children:`Choosing between mask, block, and ignore`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Mask`}),` when the layout matters but the content is sensitive: balances, names, message text.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Block`}),` when the whole region should not be captured: embedded third-party widgets, document viewers, video.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Ignore`}),` when the element can be shown but what the user types into it should not be captured.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-this-feature-does-not-do`,children:`What this feature does not do`}),`\n`,_jsx(_components.p,{children:`To keep the privacy story honest:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`There is no automatic detection of credit card numbers, government IDs, or emails in page text. Mask those regions explicitly.`}),`\n`,_jsxs(_components.li,{children:[`The SDK does not ship consent management. If you need user consent before recording, gate the `,_jsx(_components.code,{children:`init()`}),` call behind your own consent flow.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Privacy and masking","description":"What the SDK masks by default and how to control exactly what is recorded.","href":"/sdk/privacy-masking"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"What is masked by default","slug":"what-is-masked-by-default","depth":2,"children":[]},{"title":"Mask all inputs","slug":"mask-all-inputs","depth":2,"children":[]},{"title":"Controlling elements with CSS classes","slug":"controlling-elements-with-css-classes","depth":2,"children":[]},{"title":"Controlling elements with CSS selectors","slug":"controlling-elements-with-css-selectors","depth":2,"children":[]},{"title":"Choosing between mask, block, and ignore","slug":"choosing-between-mask-block-and-ignore","depth":2,"children":[]},{"title":"What this feature does not do","slug":"what-this-feature-does-not-do","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"observerbee","siteName":"Observerbee Docs","title":"Privacy and masking - Observerbee Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-30T02:50:11.980Z","originalFileLocation":"sdk/privacy-masking.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"What the SDK masks by default and how to control exactly what is recorded.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Observerbee Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/observerbee/SRKNApQwLgYNQQkN/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/observerbee/SRKNApQwLgYNQQkN/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/observerbee/SRKNApQwLgYNQQkN/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/observerbee/SRKNApQwLgYNQQkN/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/observerbee/SRKNApQwLgYNQQkN/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/observerbee/SRKNApQwLgYNQQkN/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/observerbee/SRKNApQwLgYNQQkN/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/observerbee/SRKNApQwLgYNQQkN/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/observerbee/SRKNApQwLgYNQQkN/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Privacy and masking - Observerbee Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"What the SDK masks by default and how to control exactly what is recorded.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Observerbee Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.observerbee.com/sdk/privacy-masking\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://observerbee.mintlify.site/_mintlify/api/og/v2?division=SDK+Reference\u0026amp;title=Privacy+and+masking\u0026amp;description=What+the+SDK+masks+by+default+and+how+to+control+exactly+what+is+recorded.\u0026amp;theme=3b4c002124e439dde53e43fc\u0026amp;signature=1547b9c16f4e51d5308ba754a8320941a7eca04106c44d971b5193e2ed57c07c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Privacy and masking - Observerbee Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"What the SDK masks by default and how to control exactly what is recorded.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://observerbee.mintlify.site/_mintlify/api/og/v2?division=SDK+Reference\u0026amp;title=Privacy+and+masking\u0026amp;description=What+the+SDK+masks+by+default+and+how+to+control+exactly+what+is+recorded.\u0026amp;theme=3b4c002124e439dde53e43fc\u0026amp;signature=1547b9c16f4e51d5308ba754a8320941a7eca04106c44d971b5193e2ed57c07c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/observerbee/SRKNApQwLgYNQQkN/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Observerbee Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#EAB308\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.observerbee.com/sdk/privacy-masking\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/sdk/privacy-masking.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.observerbee.com/#organization\",\"name\":\"Observerbee Docs\",\"url\":\"https://docs.observerbee.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/observerbee/hfdplA9icwRRCH4j/logo/light.svg?fit=max\u0026auto=format\u0026n=hfdplA9icwRRCH4j\u0026q=85\u0026s=69c013888e159d97449cd0431666a453\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.observerbee.com#website\",\"name\":\"Observerbee Docs\",\"url\":\"https://docs.observerbee.com\",\"publisher\":{\"@id\":\"https://docs.observerbee.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.observerbee.com/sdk/privacy-masking#webpage\",\"url\":\"https://docs.observerbee.com/sdk/privacy-masking\",\"name\":\"Privacy and masking\",\"description\":\"What the SDK masks by default and how to control exactly what is recorded.\",\"dateModified\":\"2026-08-30T02:50:11.980Z\",\"isPartOf\":{\"@id\":\"https://docs.observerbee.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.observerbee.com/sdk/privacy-masking#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.observerbee.com/sdk/privacy-masking#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"SDK Reference\",\"item\":\"https://docs.observerbee.com/sdk/installation\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Privacy and masking\",\"item\":\"https://docs.observerbee.com/sdk/privacy-masking\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.observerbee.com/sdk/privacy-masking#article\",\"headline\":\"Privacy and masking\",\"name\":\"Privacy and masking\",\"description\":\"What the SDK masks by default and how to control exactly what is recorded.\",\"url\":\"https://docs.observerbee.com/sdk/privacy-masking\",\"mainEntityOfPage\":{\"@id\":\"https://docs.observerbee.com/sdk/privacy-masking#webpage\"},\"dateModified\":\"2026-08-30T02:50:11.980Z\",\"publisher\":{\"@id\":\"https://docs.observerbee.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.observerbee.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Observerbee Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Observerbee Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/sdk/privacy-masking.md","siteName":"Observerbee Docs","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":""},{"title":"Quickstart","href":"/quickstart"},{"title":"Development","href":"/development"}]},{"group":"SDK Reference","pages":[{"title":"Installation","href":"/sdk/installation"},{"title":"Configuration","description":"Every SessionRecorder init option, with defaults, and the runtime API.","href":"/sdk/configuration"},{"title":"Privacy and masking","href":"/sdk/privacy-masking"},{"title":"Identifying users","description":"Attach your own user IDs and traits to recorded sessions.","href":"/sdk/identifying-users"},{"title":"Reliability","href":"/sdk/reliability"}]},{"group":"Core Concepts","pages":[{"title":"Sessions","href":"/concepts/sessions"},{"title":"States and the state engine","href":"/concepts/state-engine"},{"title":"Journeys and goals","href":"/concepts/journeys-and-goals"},{"title":"Agents and governance","href":"/concepts/agents-and-governance"},{"title":"Environments","href":"/concepts/environments"}]},{"group":"Integrations","pages":[{"title":"Observerbee in your AI assistant","href":"/integrations/mcp"},{"title":"Claude and ChatGPT","href":"/integrations/mcp-chat"},{"title":"Claude Code, Codex and Cursor","href":"/integrations/mcp-coding-agents"},{"title":"GitHub","href":"/integrations/github"},{"title":"Linear","href":"/integrations/linear"},{"title":"Slack","href":"/integrations/slack"}]}]}]},"basePath":"","title":"Privacy and masking - Observerbee Docs","buildId":"dpl_596ePT575z4qnAFksq1biRW97aLY","deploymentId":"dpl_596ePT575z4qnAFksq1biRW97aLY","dynamics":[],"chunks":[]}