Guide for Survey Respondent Traits

Traits refer to attributes describing a survey respondent. 

Automatically Added Traits

For each survey, you can specify if you want to track respondents ip address and location information. If both are turned on, OnVoard will automatically add the following traits:

  • ip_address
  • city
  • country_alpha2

Setting Respondent Traits

Each survey distribution uses a different methodology for augmenting respondent traits.

Email Survey

We will automatically augment the following traits with recipient's data.
  • email
  • name (if provided)

One-Click Email Survey

Similar to email distribution, we will automatically augment the following traits with recipient's data.
  • email
  • name (if provided)

Link Survey

When setting up a link survey, you can add eligible url parameters to pass additional respondent traits via survey link. For example, given that is the default survey link and you have added eligible url parameters category and country. If user answers survey from url 
  • category will be added to trait with Clothing as value
  • country will be added to trait with US as value
  • city will not be used since it has not been defined as eligible url parameter

Slide-In Web Survey

We will automatically augment the following traits with for slide-in web survey respondents.
  • first_seen
  • num_sessions (if non-zero)
  • responded_url (url where user responded to survey)

You can also use javascript API for OnVoard's widgets to pass respondent traits programmatically.

# key and value are mandatory to set trait data
OnVoard('slide_in_web_survey', 'setRespondentTrait', {
  key: 'name',
  value: 'John Doe'

# valueType is optional but we recommend you include it whenever possible. 
# When excluded, OnVoard will guess the appropriate valueType to use but 
# values like timestamp can't be accurately assigned and will be set as integer 
# if valueType is not specified.
OnVoard('slide_in_web_survey', 'setRespondentTrait', {
  key: 'registered_timestamp',
  value: 1560963668,
  valueType: 'timestamp'

Using question to collect respondent trait

One handy method is to use question to collect respondent trait. When turned on, collected answer for that question will be shown as a respondent trait instead of survey response. Keep in mind that only Text question type support this feature.

What else do you need to know about traits?

Requirements for trait key

OnVoard enforced some rules for trait key so that we can automatically prettify it for display. For example,  first_name will automatically be shown as First Name. Our convention is to use snake_case for trait key with lowercase alphanumeric characters and underscores.

  • Must only contain lowercase alphanumeric characters and underscores. E.g. first_name, social_security_number  
  • Underscores can't be at start and end of key. E.g. _name, name_  
  • Must not have consecutive underscores. E.g. first__name, my_home__address

List of supported value type for trait

When using a web survey to set respondent traits, you may need to specify value type for trait. Below is a list of supported value type for trait.
  • string
  • integer
  • float
  • boolean
  • timestamp
  • email
  • url

Immutable Value Types

Values for the following trait keys will always to be set to indicated value types.

  • Value for trait name will always be set as string value type
  • Value for trait email will always be set as email value type