Custom user traits

User traits are properties of your users, such as a name or email, that you send to SatisMeter. SatisMeter stores these traits in its record of each user. Use them to target your surveys and to segment and filter responses. This article shows what you can do with user traits and how to send them.

In this article:

What can I do with traits?

User traits add context to responses, help you target surveys, and let you filter results.

Getting responses with more context

When a user leaves a response, SatisMeter attaches their traits to it. This shows you the user's traits at the moment they responded.

Captura_de_pantalla_de_2020-07-08_10-00-35.png

Targeting surveys

In the Targeting section of the Survey Designer, select which users see the survey. Create a list of conditions based on user traits. Users see the survey only if they meet all of the conditions.

Screenshot_2021-03-31_at_13.38.50.png

Filtering results on the dashboard

In your SatisMeter dashboard, filter by Text traits to get a segmented view of your survey statistics and responses.

Screenshot_2021-03-31_at_13.39.50.png

Which traits can I send?

You can send almost any traits to SatisMeter. You decide which traits to send, along with their names and values.

If you're concerned about sending your users' personal data, SatisMeter is compliant with the General Data Protection Regulation (GDPR).

Trait types and format

SatisMeter expects each trait to be one of these types:

  • Text: Simple text traits, such as name, email, or gender. You can also pass URLs, such as website, avatar, or facebookProfile.

  • Date: For example, createdAt or birthday.

  • Number: For example, age or ltvPaid.

  • Yes/No: Also known as true/false or boolean. For example, isPremiumUser.

Here's what a collection of traits and their values might look like:

name: "John Doe"
email: "john_doe@example.com"
age: 33
createdAt: "2020-07-08T10:52:28+01:00"
isPremiumUSer: true

Important: You pass date traits as text. For SatisMeter to recognize a trait as a date, it must use ISO-8601 format.

Send trait names in medial capitals format, also known as camel case. If you can't, SatisMeter transforms them automatically, so they display correctly in your dashboard and the Survey Designer. For example, createdAt appears as "Created At," and isPremiumUser appears as "Is Premium User."

How can I send user traits?

Every time your product or website loads SatisMeter to check whether the current user should see a survey, it also sends that user's traits. As a result, most ways of sending user traits depend on how you installed SatisMeter.

When you send user traits, SatisMeter updates only the traits you send and keeps any traits you sent earlier. You don't have to send every trait each time.

In-app HTML snippet

If you installed the HTML snippet, the code you copied and pasted contains something like this:

satismeter({
writeKey: "YOUR_WRITE_KEY",
userId: "1234",
traits: {
name: "John Doe",
email: "john@doe.com",
createdAt: "2020-06-08T07:56:44.242Z"
}
});

The traits field holds the collection of traits you send to SatisMeter. Change it to include any traits you want. SatisMeter receives them each time the survey is requested.

In-app mobile

As with the HTML snippet, your installation code already includes everything it needs to send traits. To send specific user traits, modify your installation code to include them. See the mobile SDK documentation for examples:

Segment

If you use Segment, you already send all your user traits. Every time you make an identify call, Segment sends those user traits to SatisMeter.

This applies to both cloud mode and device mode.

SatisMeter API

You can send user traits with the Insert/Update user endpoint of our REST API. This method works regardless of how you installed SatisMeter. You don't even need to install SatisMeter, as long as you have a SatisMeter project.

For more information on using the API, see Insert/update user API.

Was this article helpful?
2 out of 8 found this helpful

Articles in this section

See more
Our Support hours:
Monday to Friday from 9:00 am - 2:00 am CET. Monday to Friday from 0:00 am - 5:00 pm PST.