# Privacy

By default, this instrumentation hides a wide range of Personally Identifiable Information (PII) from session replays to protect user privacy:

# Record elements

Use data-public to explicitly allow LogRocket to record the content of an element. When this attribute is present, the content inside the element, including child elements, will be captured in the session replay:

<div data-public>
    This text will be visible in the session replay.
</div>

# Block elements

To prevent an element and its child elements from being recorded, use the data-private attribute.. This is especially useful when you want to selectively exclude sensitive parts of an element tree while allowing others to be captured.

<div data-public>
    <ul>
        <li>Page 1</li>
        <li>Page 2</li>
    </ul>
    <div data-private>
        This text will be not be visible in the session replay.
    </div>
</div>