All Collections
Website Surveys
FAQs
Associating Data With A User Or Response on the web
Associating Data With A User Or Response on the web

Learn how to associate data with a user or response to your survey

Updated over a week ago

Using the "Identify" method of our javascript API, you can easily add properties to a user that can be used to target surveys to them and associate the information with all of their future responses.

These properties can include things like a unique user id or other properties like email, age, or any custom user data you have. Once the user data has been associated with them it will be used on all future responses to surveys from that user.

Additionally you can associate any response data with a user's response, unlike user data, response data is only associated with the users responses to the survey on the current page they are on, not on any future survey responses.

Response properties are commonly used to include information about the page they are on (e.g. url, sku number, order id, product name, etc)

Usage

The Identify method takes 2 objects, the first contains user properties and the second contains event properties, both of which are optional.

Setting user and response properties

Iterate('identify', { email: '[email protected]', external_id: '12abc34', }, {order_id: 12345, purchase_date: new Date()});


Setting user properties only

 Iterate('identify', { email: '[email protected]', external_id: '12abc34' });


Setting response properties only

 Iterate('identify', null, {order_id: 12345});


The property values must be a boolean, string, or number, or date.

Important Notes

1. Make sure the Iterate script appears before your call to the Identify method

The Iterate script creates the "Iterate" javascript object that you are calling, so it must be created before you can call it.

2. Once created, the type of a property (e.g. 'user_id' is a number) cannot be changed.

If you need to update the property type you can create a new key (e.g. 'user_id_string') or reach out to [email protected] to help.

Special properties

There are a few special user properties which can be used to identify users. If you send these properties you'll see the user's name or email shown on the dashboard next to their responses.

  • email

  • first_name

  • last_name

  • external_id (string)

The property 'external_id' is a string that represents your user's id within your system. If you set this property we are able to match that user across multiple platforms and sessions. We recommend setting this property.

Targeting

Once you've called the identify method, you'll find the list of user properties available to target a survey on in the 'Targeting' tab.

Exporting

In addition to targeting users based on properties, all user properties and response properties will also be available to view on our dashboard and in all available export formats (CSV, Zapier, webhooks).

Did this answer your question?