Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fuser-guides%2Frum%2Fsdk-features%2Fdata-masking.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fuser-guides%2Frum%2Fsdk-features%2Fdata-masking.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

# Data privacy and logging settings

## Overview[​](#overview "Direct link to Overview")

Coralogix offers privacy features to safeguard sensitive or personal data for organizations of all sizes as part of [Real User Monitoring](https://coralogix.com/docs/docs/user-guides/rum/getting-started/real-user-monitoring/.md). Mask sensitive clikable elements and fields in your RUM logs via the [RUM Browser SDK](https://coralogix.com/docs/docs/user-guides/rum/sdk-installation/javascript/npm-browser/.md). This masking ensures that the Coralogix SDK does not capture sensitive data and that it is consequently not transmitted to the backend. The clickable elements include buttons, labels, links, inputs, and options. They will appear in your UI as stars in the log text. In addition, determine whether user IP and geolocation data is collected or ignored.

## Configuration[​](#configuration "Direct link to Configuration")

### Masking UI elements in RUM logs[​](#masking-ui-elements-in-rum-logs "Direct link to Masking UI elements in RUM logs")

User interactions with specific clickable elements can be masked to prevent sensitive data exposure. Use `maskInputTypes` to specify the types of inputs to mask. This defaults to `['password', 'email', 'tel']`. Define any input and modify as desired. Use `maskClass` to specify the class name used to mask any element, string, or RegExp. The default is `cx-mask`.

```
CoralogixRum.init({

  // ...

  maskInputTypes: ['password', 'date'], // will only mask password and date inputs

  maskClass: 'mask-me' // will mask any element with class 'mask-me'

});
```

**Examples**

Hide the entire button, including its text.

```
<button class="cx-mask">

  <span>Text</span>

</button>
```

Hide the text inside the button (child element), while keeping the button (container element) visible.

```
<button>

  <span class="cx-mask">Text</span>

</button>
```

Apply the masking logic to the user-defined class to mask only the clickable element hierarchy.

```
<my-button-component class="cx-mask">

   <button>Text</button>

</my-button-component>
```

### User IP and geolocation data collection[​](#user-ip-and-geolocation-data-collection "Direct link to User IP and geolocation data collection")

Use `collectIPData` to determine whether user IP and geolocation data is collected (`true`, default) or ignored (`false`).

```
CoralogixRum.init({

  // ...

  collectIPData: true

});
```
