Personalize Survey Links

Identify users with URL parameters

You can choose to operate a survey page in “anonymous” mode or identify your users. To get the most out of Refiner, we recommend to identify your users.

Identifying your users can easily be done by providing either a “contact_id” and / or a “contact_email” parameter in your URL.

The following survey page URL identifies the user as “ABC123” with and email address of “test@test.com”.

https://public.refiner.io/s/4dgo4m/f1cd5620-60e2-11ea-933e-c12a4e219567?contact_id=ABC123&contact_email=test@test.com

Default URL parameters that you can use are listed below. All parameters are optional.

ParameterDescription
contact_idA unique identifier for each survey respondent. Providing an Id will identify survey respondents in your Refiner dashboard.
contact_emailThe email address of the respondent. The email address can act as an alternative to the contact_id.
localeThe language string of the user when using in the translation feature.
signatureThe computed signature when using the Identity Verification feature.
contact_<something>Any kind of user trait you want to provide (see below)
response_<something>Any kind of contextual data that you want to attach to the survey response (see below)

Please note: By default, everyone in possession of a Survey Link can respond to a survey. If you want to restrict access to the survey to identified users only, you can activate our Identity Verification option.

Provide additional user traits

In addition to the ID and email address of your user, you can provide any kind of user data within the URL.

Providing additional user data fields is easy. All you need to do is to add parameters starting with “contact_” to the URL of your survey page.

The following URL includes a user ID, an email address and additional user data.

https://public.refiner.io/s/4dgo4m/f1cd5620-60e2-11ea-933e-c12a4e219567?contact_email=test@test.com&contact_is_customer=true&contact_is_cool=yes

Providing additional user traits is a powerful method to better analyze your survey data.

All data points provided while identifying your users can be used to segment and filter your survey results in your Refiner dashboard later on.

Next to identifying your users, you can also use URL parameters to attach data to a survey response.

URL parameters starting with “response_” let preselect survey responses or add hidden fields to your survey.

Prefill first question

Next to identifying your users, you can also use URL parameters to prefill questions of survey.

URL parameters starting with “response_” let preselect survey responses or add hidden fields to your survey.

One example for this technique is to ask your customers if they are satisfied with your service and then offer a dedicated link for each possible answer (Very satisfied, Somehow satisfied, …).

Below you can see an example link that identifies your user by their email address (see above) and sets the response of a NPS survey to the value 9 / 10 by providing a ‘response_nps’ parameter.

https://public.refiner.io/s/4dgo4m/f1cd5620-60e2-11ea-933e-c12a4e219567?contact_email=test@test.com&response_nps=9

In this example, the value for the question “nps” is set by a parameter that starts with “response_” followed by the identifier of the question. The resulting URL parameter is “response_nps”.

To find the identifier of a any question in your survey, click on “Show Advanced Options” in the survey editor and locate the field “Internal Identifier”.

Locate the identifier of a question in the survey editor

Add additional data (hidden fields)

URL parameters can also be used to private “hidden” data which is not represented as a question in your survey.

You can add any “hidden field” to your survey by simply providing an arbitrary “response_<something>=<value>” parameter in your URL. Data provided through URL parameters gets automatically attached to responses provided by the user.

https://public.refiner.io/s/4dgo4m/f1cd5620-60e2-11ea-933e-c12a4e219567?contact_email=test@test.com&response_how_satisfied=3&response_a_hidden_field=yes

There is no need to create a question with a matching identifier in your Refiner dashboard. Refiner will try to match the hidden field data to a known attribute in your Refiner account. If no attribute with the same key can be found, a new attribute gets created the first time we see the data key.

Set survey language

When you use our Translations feature, Refiner automatically sets the survey language based on the “preferred language” web browser settings of the user.

You can also explicitly set the language by adding a locale parameter to the URL.

https://public.refiner.io/s/4dgo4m/f1cd5620-60e2-11ea-933e-c12a4e219567?locale=fr

Magic Variables

Magic Variables allow you to add contextual data to survey responses or user profiles. You can use Magic Variables to store things like the URL, information about a user’s web browser, or their IP address alongside survey responses.

Magic Variables can be used when identifying a user or attaching data to survey responses as shown in the code sample below.

Here is the list of all Magic Variables supported by the Refiner Web-Client:

VariableDescription
__COUNTRY_CODE__The country code of the user as described here
__CURRENT_URL__The current URL of the user
__IP_ADDRESS__The current IP address of the user
__LOCALE__The locale value as described here
__WEB_BROWSER__The web browser name of the user (e.g. Chrome 27)
__WEB_DEVICE_OS__The operating system of the user (e.g. Mac OS)
__WEB_DEVICE_TYPE__The device type of the user (e.g. desktop, tablet, mobile)

Was this helpful? Let us know with a quick a vote