Skip to main content

Identify and target respondents by user_id

Target your Website surveys to identified visitors

Written by Agnieszka
Updated over a week ago

After creating your Website or in-product survey, you can decide whether to distribute it to all visitors, or a chosen group of users.

Survicate lets you choose the survey's Audience, depending on your use case.

In this article, we'll tell you more about the possibilities, and how to set up such a survey targeting.

When you create a new Website or in-product survey, the default Audience will be All Visitors.

You can change it to one of the custom Audiences we will talk about in this article, or to All logged-in users:

It's a great solution if you'd like to enable a survey for all identified users.

💡 It will work as expected when you pass user information from your website to Survicate, such as user_id.

If your use case is more complex, keep on reading to learn about the custom Audience settings, which you can choose for your survey.

Anonymous visitors (frontend targeting)

With this option, responses are anonymous by default.

If you'd rather see the respondents' information in the survey's analysis in Survicate, you can send it to us from your website or web-app, with the use of JavaScript SDK.

Such respondent traits can also be used to set up a survey's Audience and ask for feedback from a group that matches the characteristics.

To use this method, in the survey's Target ➡️ Audience tab, select +Add audience ➡️ Anonymous visitors:

Give your audience a name and click Create Audience:

You can define your audience based on various Filters, with up to 50 filters in an Audience:

To target a survey based on respondent attributes that you will pass to Survicate, select and use the Attributes filter.

Then, click on Create audience.

Remember to enable your Audience(s) when ready:

Logged-in users (backend targeting)

This option allows you to target respondents by user IDs.

In this method, you should send the respondent data to us first, we save it in our database, and then we send it back to the website or web-app, to determine whether the survey should appear or not.

User IDs can be in any form - names, numbers, emails, as long as they are unique for each user.

Additionally, the user IDs can be dynamically changed in your web-app or website, and the survey will automatically know whether a certain user belongs to an Audience or not.

With this targeting method, you can target those respondents who, for example:

  • have a certain email domain, ID, or name,

  • performed some specific actions during a logged-in user visit, such as added products to a cart, but didn't finish the purchase, or removed an item from Favorites, etc.

To set up such a survey, you should go to its Target ➡️ Audience tab, and select +Add audience ➡️ Logged-in users:

Click Add filter → Attributes to define which visitors should see the survey:

You can then refine your audience further by choosing whether to include or exclude users based on specific attributes:

💡 Even though this setup follows the same steps as in the Anonymous visitors audience, the Anonymous visitors targeting uses IDs stored locally in the users' browsers, and we are unable to recognize them if they visit from a different browser.

Whereas the Logged-in users targeting, we'll recognize the users regardless of the device or browser they use, because the IDs are stored on our server side.

Optionally, add other filters, for example, Events:

Add the Event name and, if you'd like to narrow down the Audience further, specify the required number of event occurrences, or time of the first and last occurrence:

Then, click on Create audience.

Remember to enable your Audience(s) when ready:

❗️For this targeting method, we recommend using a secret key and a user key for more advanced security. It is disabled by default - read here how to set it up.

Manual audience uploaded via CSV file (backend targeting)

This targeting method is similar to the Logged-in users approach.

As the name suggests, it allows you to upload a table with user IDs and other attributes to Survicate and then use that data to decide whether to show a survey to users with certain user IDs or not.

The manually uploaded Audience is static, which means that, unlike in the Logged-in user method, the user IDs you upload to Survicate are the ones we target a survey based on, even if the ID changes in your app or website.

How it works:

  • you upload a CSV file with users' names as the IDs to Survicate

  • one of the uploaded user's name was John Smith,

  • then, the user changed it in your website or web-app to Joe Smith,

  • the survey will still be targeted for John Smith, and not appear to the same user who now has a different name.

To set up such a survey, you should go to its Target ➡️ Audience tab, and select +Add audience ➡️ Manual audience (CSV upload):

Then, upload a CSV file from your device. It can contain up to 10,000 rows and 100 columns, it should be no larger than 20MB, and include some form of respondents' identification data in the column named "user_id" - any unique identifier like numerical IDs, emails, names, etc.:

You can also download a sample CSV file to see how the spreadsheet should look:

If you upload other attributes besides "user id," the targeting will still be based only on user ids (or email addresses, or names - the values that you upload in the "user_id" column).

The other attributes cannot be used to target the survey, but they will be seen in the Analysis of your survey, as additional information about the respondents, which you can also filter the results by.

If any of the other user attributes you uploaded in the CSV file change their value in your website or app, it will be reflected in the Audience's CSV table, as well as in the Analyze tab.

This way, both in the targeting and the analysis, you can see the most recent and accurate information, such as subscription name, company size, and much more.

After adding your file, add the Audience name and click on Create audience.

The created Audience allows you to remove some of the users, and then enable it:

❗️For this targeting method, we recommend using a secret key and a user key for more advanced security. It is disabled by default - read here how to set it up.

Backend-targeted surveys may appear with some delay, as it may take us some time to receive information from the server.

If you have two surveys enabled and targeted at the same website or app, and one is frontend-targeted and another one is backend-targeted, the frontend one will be shown first.

❗️A survey can have only one type of targeting - either frontend or backend. Thus, the Anonymous visitors Audience cannot be joined with other audience types, while the Logged-in users and Manual audiences can be joined together.

Did this answer your question?