When it comes to collecting feedback, understanding who your users are and how they interact with your product is crucial. By knowing who the feedback is coming from, you can gain valuable insights and make informed decisions.
One way to improve the accuracy and efficiency of the feedback process is to prefill fields and add custom data with information about the user, such as their name, email address, and account details. This not only saves time, but also enables you to respond to user feedback more quickly and effectively.
Getting Started with Identifying Users
To begin, simply send your user details to Userback via our JavaScript API. This can be done by creating an object with the user's information and then sending it to Userback.
User data can include a unique identifier (uid
), default attributes (name
, email
, location
, first seen
, last seen
), and custom attributes (optional key/value pairs that provide additional information about the user).
When a user submits feedback, their data is added or updated in Userback. This means that each time a user provides feedback, their information is updated in Userback, making it easy to track their activity and see how their feedback evolves over time.
Method 1: user_data
Here's an example of how to send user data using the user_data
object which sets user information before the JavaScript SDK is added.
window.Userback = window.Userback || {};
Userback.access_token = '[YOUR_ACCESS_TOKEN]';
Userback.user_data = {
id: 123456,
info: {
name: 'Nathan Peck',
email: 'npeck@gmail.com',
plan: 'Pro',
account_id: 456785
}
};
(function(d) {
var s = d.createElement('script');s.async = true;
s.src = 'https://static.userback.io/widget/v1.js';
(d.head || d.body).appendChild(s);
})(document);
Method 2: identify
Alternatively, you can use the identify(uid, attributes)
method after JavaScript SDK has been loaded. Here's an example of how you would use the identify
method:
Userback.identify(123456, {
name: 'Nathan Peck',
email: 'npeck@gmail.com',
plan: 'Pro',
account_id: 456785
});
The setData() method can be called multiple times. The previous data gets overwritten when setData() is called again.
Key names canβt contain periods ('.'), dollar signs ('$'), characters like ~`!@#%^&*'{}|\'". β If an unsupported character is used, the key will be created with an underscore in its place.
Data values must be sent as JSON strings, numbers or booleans (true or false). We canβt accept object, nested hashes and array data formats. In order to bind custom data in rich format (e.g. object), use console log instead.
Viewing User Identification Data
Once you've successfully sent user data to Userback, you'll be able to view it in the right-hand panel of the Userback dashboard. This will allow you to see at a glance who has provided feedback and access their information quickly and easily.

Object Attributes
A short breakdown of all the available attributes for use within the User Identification feature.
Name | Description | Example |
uid | A string containing your unique identifier for a user. | 123456 |
default attributes
| The attributes every identified user has in Userback. Note: name and email attributes are set via API. Other attributes are automatically generated by the system. | { name: 'Nathan Peck', email: 'npeck@gmail.com' } |
custom attributes | A JSON object with key/value pairs that provides additional information about your user (optional). | { plan: 'Pro', account_id: 456785 } |
If you require assistance with user identification, do not hesitate to reach out for help.
π Who is this article for?
Plans | Solo | Startup | Company β | Premium β |
User type | Client | Collaborator | Admin β | Owner β |