Setting Custom Data
Discussed here is how to set user attributes and tags, as well as log user events, and their relevant APIs for your React Native apps.
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.

This is where additional user attributes appear in your bug reports.
To add a new user attribute use the following method.
JavaScript
You can also retrieve the current value of a certain user attribute, or retrieve all user attributes.
JavaScript
Or remove the current value of a certain user attribute:
JavaScript
User Events
You can log custom user events throughout your application. Custom events are automatically included with each report.
React Native
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.

This is where tags appear in your bug reports.
The example below demonstrates how to add tags to a report.
JavaScript
You can also get all the currently set tags as follows.
JavaScript
Last, you can reset all the tags.
JavaScript
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.

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.
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.
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
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
Removing Feature Flags
If your feature flag is concluded or you would like to simply remove it, you can use this method:
JavaScript
Clearing Feature Flags
You can use the below method to clear all the Feature Flags from your reports:
JavaScript
Last updated