How do I keep part of my site out of UserProof recordings?
Add data-exclude to any element, or list selectors in the script tag's data-exclude. Inside that area, clicks keep their position but the text becomes [masked], and field activity and selections are left out. Mark rich-text editors yourself. It works on every plan. Tested November 9, 2026.
This page is for founders who added UserProof with a coding agent and have an area of the site, such as an account balance or a text editor, that should stay out of what the agent reads. Excluding works the same on every plan, including Free at $0 and Pro at $29 a month.
What we tested: on November 9, 2026 we loaded the current recorder on a test page in Chromium, ran 11 situations, and captured the events it sent. Of the private strings we planted, the only one that left the browser was the text of a rich-text editor we had not marked. The results are in the table below.
What do you want to keep out?
| You want to hide | Do this |
|---|---|
| One block, such as a balance or an address | Add data-exclude to that element |
| Every element of one kind | List a selector in the script tag's data-exclude |
| A rich-text editor | Add data-exclude to it. This one needs it, see the table |
| A whole page | Do not load the script on that page |
| A password or a typed form value | Nothing to do for what visitors type. Field values are never recorded. Mark a textarea that is pre-filled in your HTML |
| A query string or a #hash in the URL | Nothing to do. Both are stripped before sending |
How do I exclude part of my site, step by step?
- Mark the element. Put
data-excludeon the outermost element you want hidden, for example<div data-exclude>...</div>. Everything inside it is covered. Done looks like the attribute showing on that element in your page source. - Or list selectors in the script tag. To cover a class across the site, add them comma-separated:
<script defer src="https://ingest.getuserproof.com/sdk.js" data-site="YOUR_SITE_ID" data-exclude=".private-note,#balance"></script>. An invalid selector is dropped without an error, so check each one, and avoid commas inside a single selector. Done looks like the attribute on your script tag. - Deploy, then click the area yourself. Open your browser's developer tools, go to the Network tab, filter for
api/events, and click inside the area. Requests go out every 5 seconds. Done looks like"text":"[masked]"on your click event, with your private words nowhere in the request.
What the recorder actually sent in our test
| What we did | What was sent | Private text sent? |
|---|---|---|
| Clicked a plain button | Position, element and its label | Not private |
Clicked a button inside data-exclude | Position and element, label [masked] | No |
| Clicked a button matched by the script tag's selector | Position and element, label [masked] | No |
| Clicked a parent holding an excluded child | Position and element, all text [masked] | No |
Clicked an editable area with no data-exclude | The first 50 characters of its text | Yes |
Clicked an editable area with data-exclude | Position and element, text [masked] | No |
| Typed an email address in a normal field | Field name, label, focus time and whether it had a value | No |
Typed in a field inside data-exclude | No field event. The click that focuses it still sends position and id | No |
| Typed a password | No field event. The click that focuses it still sends position and id | No |
Selected text inside data-exclude | No event | No |
Loaded the page with ?token=...#frag | The address without either part | No |
Run November 9, 2026 in Chromium against public/sdk.js from the UserProof repository, with a local server capturing each request. 12 events were sent. Selecting or copying ordinary page text outside an excluded area does send that text, up to 200 characters. Selections made while a form field or editor has focus are not sent.
What does data-exclude not hide?
It hides content, and it does not hide the fact that someone was there. A click inside an excluded area still sends its position, the tag, the element's id, its class names, a selector built from its id, name, data-testid or aria-label, and, for a link that leaves the page, the link's address without its query string. Never put private data in any of those. The visit still counts toward your monthly limit, as what counts as a visit explains. The page address is still sent without its query string, so a private value inside the path itself, such as /invoice/4417, is sent too. Keep such a page out by leaving the script off it.
Mouse movement over an excluded area is left out of the pointer summary, and so are copies and selections. On a touch screen a tap only adds to a count, with no position, and that count does not check for excluded areas. Everything the script records is listed on what the script tag records.
Why does a rich-text editor need marking?
A click stores the first 50 characters of the clicked element's text, so an agent can tell which button was pressed. An editable div is not a form field, so its text is treated like any other text on the page. A note, a draft or a comment box built that way will send its opening words on click unless you add data-exclude. A normal input does not have this problem. A textarea that arrives pre-filled in the page's HTML does, because its starting text counts as text on the page, so mark it too. What a visitor types into either one is not sent.
Can my coding agent add this for me?
Yes. Tell it: add data-exclude to every element that shows account data, and to every rich-text editor. It edits your templates like any other change, and you can check the result with the Network steps above. Our dead click finder is a free way to see which clicks on a page respond at all, with nothing sent back. See plans and limits if you are choosing a tier, or compare what each tool records on session replay tools for AI coding agents, ranked.
Running a second recorder as well? Each one uses its own marker, so data-exclude does nothing for the other tool. The free masking snippet generator prints the matching attribute or class for Hotjar, Microsoft Clarity, FullStory, PostHog, LogRocket, OpenReplay and Mouseflow, read from each vendor's docs on November 14, 2026.
Sources, read November 9, 2026
- Exclusion rules, click text length, masking and URL stripping:
public/sdk.jsin GetUserProof/userproof - Test results: our run on November 9, 2026, 11 situations, 12 captured events
- Plans: getuserproof.com/pricing
FAQ
How do I stop UserProof recording part of a page?
Add the data-exclude attribute to the element, or list CSS selectors in the data-exclude attribute of the script tag. Inside that area, clicks send their position and element with the text replaced by [masked], and typing, selections and mouse movement are left out.
Does UserProof record what people type?
Field values are never recorded. For a normal input the recorder sends the field name, label, focus time and whether it had a value. A rich-text editor built on an editable div is different: a click sends its first 50 characters unless you mark it with data-exclude.
Does data-exclude cost extra?
No. It is part of the script on every plan, including Free at $0 and Pro at $29 a month.
Can I exclude a whole page from UserProof?
Yes. Leave the script off that page. data-exclude works on elements, so a page that loads the script is still counted and its address is still sent without the query string.
How can I check that an area is excluded?
Open your browser's developer tools, filter the Network tab for api/events, and click inside the area. Your click event should show the text as [masked], and your private words should not appear anywhere in the request.