Welcome to Instabug's Documentation!
Here you'll find a comprehensive technical guide
to help you start working with the Instabug SDK efficiently.

Get Started

Setting Custom Data

Discussed here is setting user attributes, tags, as well as logging user events and their relevant APIs.

User Attributes

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

User Attributes - Dashboard

User Attributes - Dashboard

To add a new user attribute use the following method.

//iOS
Instabug.SetUserAttribute("18", "Age");
Instabug.SetUserAttribute("True", "LoggedIn");

//Android 
Instabug.SetUserAttribute("Age", "18");
Instabug.SetUserAttribute("LoggedIn", "True");

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

//iOS
//Get all the created user attributes
Instabug.UserAttributes();
//Get the value of a ceratin user attribute
Instabug.UserAttributeForKey("Age");

//Android
//Get the value of a ceratin user attribute
String value = Instabug.GetUserAttribute("Age");

Then remove the current value of a certain user attribute.

//iOS
//Remove a user attribute
Instabug.RemoveUserAttributeForKey("Age");

//Android
//Remove a user attribute
Instabug.RemoveUserAttribute("Age");
//Remote all user attributes 
Instabug.ClearAllUserAttributes();

User Events

You can log custom user events throughout your application. Events are automatically going to be included with each report.

//iOS
Instabug.LogUserEventWithName("User Event");

//Android
//Not supported yet.

Tags

You can add custom tags to the reports sent by the SDK. Those tags can later be used to filter reports or set custom rules on the Instabug dashboard.

Tags - Dashboard

Tags - Dashboard

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

//iOS
string[] tags = { "tag1", "tag2" };
NSArray nsArray = NSArray.FromObjects(tags);		
Instabug.AppendTags(nsArray);

//Android
Instabug.AddTags("Tag1","Tag2","Tag3");

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

//iOS
NSArray tags = Instabug.GetTags();

//Android
IList<string> tags = Instabug.Tags;

Last, you can reset all the tags.

//iOS
Instabug.ResetTags();

//Android
Instabug.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.


What's Next

You now have more information than ever about each bug report, so we suggest you read up more on bug reporting. Also, did you know that you can use custom user attributes and events to target surveys?

Bug Reporting
Targeting Surveys

Setting Custom Data


Discussed here is setting user attributes, tags, as well as logging user events and their relevant APIs.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.