Custom variables

Learn how to use custom variables for personalized survey links and better data analysis.

Jamie Shuey avatar
Written by Jamie Shuey
Updated over a week ago

Lyssna's custom variables feature allows you to save additional information about your participants by passing it into your test results using your test's recruitment link. The custom variables you add to your URL will be saved on the participant’s response, are visible on the test results page, and are included in the CSV export of responses.

Custom variables are available when recruiting participants from your own audience on the Pro plan.

What are custom variables?

Custom variables are like special tags that carry extra information about the people taking the survey. They help researchers identify and group respondents based on certain criteria. Custom variables are helpful for organizing data and understanding different groups' responses, which can be important for research or marketing purposes. They also allow you to track where a test participant came from if you share your test's URL in more than one place.

Common uses for custom variables

  • To track each participant individually by including a unique variable such as an email address, user ID, or other identifier in the recruitment links. This is helpful for keeping track of users who have completed your test so you can reward them later.

  • To add extra (non-identifying) information about the panelist, or add further demographic context to survey responses. For example, it can tell us which group or category they belong to, what type of person they represent, or which department they work in.

  • To track and measure the effectiveness of different ways of inviting people to surveys. For example, if a survey is shared through Facebook, LinkedIn, and email newsletters, custom variables can be added to the survey links for each platform. These variables help identify which platform brought the most respondents, allowing researchers to see which recruitment method worked best. It's like adding a tag to each link to see where the participants came from.

How to use custom variables

Custom variables are set by adding special tags or parameters to a URL, usually through the query string, or the part of the URL that comes after the "?".

For example, you might send someone to a page on a website using the following URL:

https://example.com/test-page?ref=abc123

In the example above, "ref=abc123" is the parameter that is setting a custom variable. When someone visits that URL, the browser assigns the value of 'abc123' to the 'ref' variable, which can then be used to track that user later.

There’s no special setup required on your test to use custom variables. All you need to do is:

  1. Enable the recruitment link for your test. See how to recruit your own participants for instructions.

  2. Create customized versions of the link by adding your custom variables to the end of it.

  3. Share these links in the right places or with the right people.

Adding custom variables to your recruitment link

Your test's recruitment link will look something like this:
https://usabi.li/do/yourtest

Custom variables are added to the end of this URL as a query string. If you already know what a query string is, you’re all set. Otherwise, keep reading—it’s easy!

  1. Start by copying and pasting this link into a text editor such as Notepad

  2. Add a question mark (?) to the end of the URL

  3. For each variable you want to track on the response, add the name of the variable, then an equals sign (=), and then the value. For example name=Tom or userId=456.

  4. If you’re using more than one custom variable, put an ampersand character (&) between them.

Examples

Using a single custom variable

Note the question mark (?) before the variables.

Link template:
https://usabi.li/do/yourtest?name=[name_value]

Example link:
https://usabi.li/do/yourtest?name=Tom

Using multiple custom variables

Note the ampersand (&) between each variable.

Link template:
https://usabi.li/do/yourtest?name=[name]&userId=[userId]&plan=[plan]

Example link:
https://usabi.li/do/yourtest?name=Tom&userId=456&plan=Starter

Sharing your links

Once you’ve created link variants you will need to ensure that you share them correctly.

When using personalized links, share each link with the correct person.

Share this link with Tom:
https://usabi.li/do/yourtest?name=Tom

Share this link with Sally:
https://usabi.li/do/yourtest?name=Sally

Or share each link in the right place.

Share this link on Facebook:
https://usabi.li/do/yourtest/123?source=Facebook

Share this link on LinkedIn:
https://usabi.li/do/yourtest/123?source=LinkedIn

Generating large numbers of links with custom variables

When recruiting on a larger scale, manually creating customized links for each person becomes impractical. Instead, you can use automated tools like URL builders, your Customer Relationship Management (CRM) system, or email marketing platforms to generate different links with custom variables for each user. Unfortunately, our platform doesn't have built-in link generation for custom variables, so you'll need to use an external tool. These tools will allow you to specify where variables are placed in the test URL and automatically generate the right values for each participant. It's a time-saving and efficient way to handle personalized survey links for multiple participants.

Viewing custom variables

Once you have collected responses your test results page displays all of the custom variables that were passed in. Open a participant’s full response and expand the section Participant information to view the custom variable information that was passed in for that participant.

All custom variables are also included as columns in the CSV export of test results.

Filtering your results

You can also filter your results using custom variables if you want to isolate the response of a particular participant. Simply select the custom variable(s) for that participant or participants at the bottom of the Filters tab on the lefthand sidebar of your results.

Common Questions

Can I use custom variables when ordering responses from participants on Lyssna's panel?

No, our custom variable feature cannot be used for panel orders. Custom variables will require users to click a link you manually edit and share with them. Since we manage panel invite links automatically, you won't have the opportunity to edit the URL these users will see before the invite is sent.

Did this answer your question?