> For the complete documentation index, see [llms.txt](https://docs.luciq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.luciq.ai/product-guides-and-integrations/product-guides/luciq-pii-masking/user-steps-privacy-api.md).

# User Steps Privacy API

### What this is? <a href="#what-this-is" id="what-this-is"></a>

A new SDK API lets you disable view content capture in User Steps and Repro Steps while keeping the journey signal (gesture, view type, screen name, timestamp).

* **Default is unchanged** capture stays on unless you explicitly call the API.
* **Screenshots are not affected** Session Replay and bug report screenshots continue to behave as before. Use the screenshot-masking APIs for those.
* **Events still fire** every tap, scroll, switch, slider change is recorded. Only the view's visible text is redacted.

***

### How to enable it? <a href="#how-to-enable-it" id="how-to-enable-it"></a>

**Android**

```
Luciq.setViewsContentCaptureEnabled(false);
```

**iOS**

```
Luciq.viewsContentCaptureEnabled = false
```

Call once at app startup. Runtime-toggleable flipping it back to `true` resumes content capture on subsequent events.

#### User Steps <a href="#user-steps" id="user-steps"></a>

| Scenario                                                | Before                                                  | After                                                      |
| ------------------------------------------------------- | ------------------------------------------------------- | ---------------------------------------------------------- |
| Tap a button labeled "Home" with resource ID `btn_home` | `Tap in "Home" of type "Button" in "MainActivity"`      | `Tap in "btn_home" of type "Button" in "MainActivity"`     |
| Tap a button without a resource ID                      | `Tap in "Home" of type "Button" in "MainActivity"`      | `Tap in "Button" in "MainActivity"`                        |
| Tap a TextView                                          | `Tap in "Welcome" of type "TextView" in "MainActivity"` | `Tap in "tv_welcome" of type "TextView" in "MainActivity"` |
| Toggle a switch                                         | `Enable in "Notifications" of type "Switch"`            | `Enable in "sw_notifications" of type "Switch"`            |
| Move a SeekBar                                          | `Move in "Volume" of type "SeekBar"`                    | `Move in "sb_volume" of type "SeekBar"`                    |
| Scroll / swipe / pinch                                  | unchanged                                               | unchanged (no text captured today)                         |

#### Repro Steps <a href="#repro-steps" id="repro-steps"></a>

| Scenario                                       | Before                                         | After                                                |
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------------- |
| Button with visible text only                  | `the button "Login"`                           | `a button`                                           |
| Button with both text and `contentDescription` | `the button "Login"`                           | `the button "<contentDescription>"`                  |
| Button with `contentDescription` only          | `the button "Login"`                           | `the button "Login"` (unchanged)                     |
| Button with icon only                          | icon bitmap captured                           | `a button` (icon dropped)                            |
| TextView with text only                        | `the label "Welcome back"`                     | `a label`                                            |
| TextView with text + `contentDescription`      | `the label "Welcome back"`                     | `the button "<contentDescription>"`                  |
| ImageView with `contentDescription`            | `the image "Profile"`                          | `the image "Profile"` (unchanged)                    |
| Switch with text only                          | `the switch "Notifications"`                   | `a switch`                                           |
| Switch with `contentDescription`               | `the switch "Notifications"`                   | `the switch "<contentDescription>"` (unchanged)      |
| SeekBar with label + progress                  | `the slider "Volume" to 75`                    | `the slider "Volume"` (progress dropped, label kept) |
| Tab with text                                  | `the button "Home"`                            | `a button`                                           |
| Tab with icon only                             | icon captured                                  | `a button` (icon dropped)                            |
| Card / ViewGroup aggregating child labels      | `UI that contains "Home - Profile - Settings"` | empty descriptor                                     |

#### Jetpack Compose <a href="#jetpack-compose" id="jetpack-compose"></a>

| Scenario                                     | Before                                                   | After                                  |
| -------------------------------------------- | -------------------------------------------------------- | -------------------------------------- |
| `Button("Login")` with `testTag("loginBtn")` | `the Composable with text "Login" and tag {loginBtn}`    | `the Composable with tag {loginBtn}`   |
| `Button("Login")` without a test tag         | `the Composable with text "Login"`                       | `a Composable`                         |
| `Slider` at 0.75 with test tag               | `the Slider Composable with tag {vol} to 0.75`           | `the Slider Composable with tag {vol}` |
| `Text("Welcome")` with test tag              | `the Label Composable with text "Welcome" and tag {...}` | `the Label Composable with tag {...}`  |

### Before vs. After iOS <a href="#before-vs.-after-ios" id="before-vs.-after-ios"></a>

#### User Steps (UIKit) <a href="#user-steps-uikit" id="user-steps-uikit"></a>

| Scenario                        | Before                                               | After                             |
| ------------------------------- | ---------------------------------------------------- | --------------------------------- |
| Tap UIButton with title         | `Tap in "Home" of type "Button" in "MainVC"`         | `Tap in Button in MainVC`         |
| Tap UILabel                     | `Tap in "Welcome" of type "UILabel" in "MainVC"`     | `Tap in UILabel in MainVC`        |
| Tap UIImageView with a11y label | `Tap in "Profile" of type "UIImageView" in "MainVC"` | `Tap in UIImageView in MainVC`    |
| Toggle UISwitch                 | `Enabled in "Notifications"…`                        | `Enabled in UISwitch…`            |
| Drag UISlider                   | `Moved "Volume"…`                                    | `Moved UISlider…` (value dropped) |

#### User Steps (SwiftUI) <a href="#user-steps-swiftui" id="user-steps-swiftui"></a>

| Scenario                               | Before                   | After                                                      |
| -------------------------------------- | ------------------------ | ---------------------------------------------------------- |
| `Button("Home")`                       | `Tap on Home`            | `Tap on a button`                                          |
| `Text("Welcome")`                      | `Tap on Welcome`         | `Tap on a text`                                            |
| `Slider` editing changed               | `Changed Volume to 0.75` | `Changed a slider`                                         |
| Customer-explicit `.setMessage("...")` | unchanged                | **unchanged** your explicit messages are never overwritten |

#### Repro Steps <a href="#repro-steps.1" id="repro-steps.1"></a>

| Scenario                               | Before                         | After                                 |
| -------------------------------------- | ------------------------------ | ------------------------------------- |
| UIButton with title                    | `the button "Login"`           | `a button`                            |
| UIButton with icon only                | icon captured                  | `a button` (icon dropped)             |
| UILabel with text                      | `the text "Welcome"`           | `a text`                              |
| UIImageView with a11y label            | `the image "Profile"`          | `an image`                            |
| UITextField with placeholder           | placeholder text               | `UI element`                          |
| UISwitch with a11y label               | `the switch "Notifications"`   | `a switch`                            |
| UISlider                               | `the slider "Volume" to 0.75`  | `a slider` (label + progress dropped) |
| Bar button / tab-bar button with label | `the button "Done"`            | `the button`                          |
| Container with child labels            | `UI that contains "X - Y - Z"` | `UI element`                          |

***

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.luciq.ai/product-guides-and-integrations/product-guides/luciq-pii-masking/user-steps-privacy-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
