# Setting Custom Data

### User Attributes

You can assign custom attributes to your users and they will show up on your Luciq dashboard with each report. These attributes can later be used to filter reports in your dashboard.

![2888](/files/2b09454cb50d2dfe2c106d1f2e07a46846995c7d)

This is where additional user attributes appear in your bug reports.

To add a new user attribute use the following method.

JavaScript

```javascript
Luciq.setUserAttribute("Age", "18");
Luciq.setUserAttribute("Logged", "True");
```

{% hint style="info" %}
Disclaimers:

* Each Bug or Crash Report could have up to 100 user attributes only.
* The character limit for the Keys and Values is 90 characters each.
  {% endhint %}

You can also retrieve the current value of a certain user attribute, or retrieve all user attributes.

JavaScript

```javascript
// Getting attribute
const attribute = await Luciq.getUserAttribute('Logged in');

// Loading all attributes
const attributes = await Luciq.getAllUserAttributes();
```

Or remove the current value of a certain user attribute:

JavaScript

```javascript
Luciq.removeUserAttribute("Completed IAP");
```

### User Events

You can log custom user events throughout your application. Custom events are automatically included with each report.

React Native

```javascript
Luciq.logUserEvent("OnFeedbackButtonClicked");
```

### Tags

You can add custom tags to your bug and crash reports. These tags can later be used to filter reports or set custom rules from your dashboard.

![2888](/files/09c599518eab3bd12333159ec34f574325990fe8)

This is where tags appear in your bug reports.

The example below demonstrates how to add tags to a report.

JavaScript

```javascript
Luciq.appendTags(["Tag 1", "Tag 2"]);
```

{% hint style="info" %}
Adding tags before sending reports

Sometimes it's useful to be able to add a tag to a bug report before it's been sent. In these cases, the perfect solution would be use the event handlers of the bug reporting class. You can find more details [here](broken://pages/0b9dd74a2784397c26c4c37d8438547f030b864c).
{% endhint %}

You can also get all the currently set tags as follows.

JavaScript

```javascript
const tags = await Luciq.getTags();
```

Last, you can reset all the tags.

JavaScript

```javascript
Luciq.resetTags();
```

#### Managing Tags

If you'd like to remove a particular tag from your dashboard to prevent it from appearing again when entering a new tag manually, you can do so by navigating to the tags page under the settings options and remove the tag. You can also edit and rename the tag.

![](/files/c36ace015122f5b57d7eeb73601ad73fbf556cb3)

***

### Feature Flags

In certain scenarios, you might find that you're rolling out different experiments to different users, where your user base would see different features depending on what's enabled for them. In scenarios such as these, you'll want to keep track of the enabled experiments for each user and even filter by them.

{% stepper %}
{% step %}
**Feature Flag Naming**

Each feature flag name should not exceed 70 characters and each variant name should not exceed 70 characters. Otherwise, they will get ignored by the SDK. Note that feature flag names are case-insensitive.
{% endstep %}

{% step %}
**Feature Flag Persistence**

Feature flags persist beyond individual sessions and are not automatically removed at the end of a session. Additionally, calling the logOut function does not impact the existence of the feature flag. The feature flag is only removed when you call the removing method or the clearing method.
{% endstep %}

{% step %}
**Amount of Feature Flags Sent**

The amount of feature flags sent in a session is 200 with a maximum of 1 variant per multivariate feature flag. For example, a feature flag that has 3 variants sent within 1 session will only be sent to our backend as the last variant, and not all 3.
{% endstep %}
{% endstepper %}

#### Adding Feature Flags

**Boolean Feature Flags - Example Usage**

Below is an example of where in your code you would use a feature flag. In this example, you are experimenting with feature logic that controls whether or not the user has a Dark Mode toggle available.

JavaScript

```javascript
const boolFeatureFlag: FeatureFlag = {name: 'Boolean Feature Flag'}
Luciq.addFeatureFlags([boolFeatureFlag]);
```

**Multivariant Feature Flags - Example Usage**

Below is an example of where in your code you would use a feature flag with multiple variants. In this example, you are experimenting with feature logic that controls multiple versions of a specific feature.

JavaScript

```javascript
const featureFlag: FeatureFlag = {name: 'Boolean Feature Flag'}
Luciq.addFeatureFlags([featureFlag]);
```

#### Removing Feature Flags

If your feature flag is concluded or you would like to simply remove it, you can use this method:

```javascript
Luciq.removeFeatureFlag('FeatureFlag'); // remove single key
Luciq.removeFeatureFlags(['featureFlagA', 'featureFlagB']); // remove multiple feature flags at once
```

#### Clearing Feature Flags

You can use the below method to clear all the Feature Flags from your reports:

JavaScript

```javascript
Luciq.removeAllFeatureFlags();
```


---

# Agent Instructions: 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:

```
GET https://docs.luciq.ai/react-native/setup-luciq-for-react-native/custom-settings/setting-custom-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
