Linking surveys and passing data

Introduction

Researchers often use panel providers or other surveying platforms alongside Discover. In these cases, passing information between platforms—such as respondent IDs or other data—is essential.

A common scenario is passing panelist IDs from a panel provider into Discover, then returning them when respondents exit the survey, ensuring they are credited for participating.

This article covers two main processes: 1) Passing (linking) data into Discover, and 2) Passing data out of Discover.

Anatomy of a URL

Passing data into or out of your survey is done through the survey’s URL. While this may sound a bit technical, we’ll break it down into easy steps.

A URL is made up of several parts: the protocol (such as "https://"), the domain, subdirectories (if any), and parameters (if any). For now, focus on the parameters.

A URL broken into for sections: protocol, domain, subdirectories, and parameters.

Parameters are like variables—containers that hold information. In a URL, they are separated by ampersands (&). Read the variable manager help article for more information about variables.

Key-value pairs: Parameters are made up of two parts: the "key," which is the name of the container (where data is stored), and the "value," which is the data stored in the container.

Important note: Since URL parameters are visible to anyone with the link, avoid including sensitive information (like passwords or IDs) in the URL.

Now that we’ve covered URL basics, let’s explore how to use parameters to pass data into and out of your survey.

Passing data (linking) in

Creating variables (URL parameters)

The first step in bringing respondent data into your survey is to create variables to store that information in the Discover database.

For a more detailed guide, refer to the Variable manager help document. To create variables, you can do so in two places:

  1. The Share tab, or
  2. The Variable Manager in the Tools dropdown.
Create new variables on the share tab or in the variable manager.

To create a variable:

  1. Click the + Add variable button at the bottom of the table (see example image below).
  2. Enter a name for the variable. Once you’ve finished, click anywhere outside the name field to save the variable. This will create a new column in the survey’s database with the name you’ve provided.
  3. Publish your changes by clicking the Publish button in the upper right corner.
User interface showing the variable manager and how to add a variable

Once a pass-in variable is saved, it is automatically added as a parameter to the survey link (URL), as shown in the survey link on the Share page.

User interface showing where the example survey link is located

 

Filling in the parameter values

At this stage, you're halfway there. With your variables created, the shareable survey link is ready to be sent to the referring panel provider (or another platform).

The final step in passing data between surveys is to replace the placeholder values in the parameter key-value pairs within the survey link with the actual data to be passed in. In Discover, these values are marked with placeholder "XXXX" in the URL.

User interface highlighting the Xs that need to be replaced

Unfortunately, we cannot provide specific instructions for every platform, as each one has its own process. However, the general approach is as follows:

  1. Copy the shareable survey link from the Share tab in Discover. Identify the section in the referring platform where respondents will be redirected to Discover (e.g., in an email invitation or upon survey completion).
  2. Paste the Discover survey link in this section and replace the "XXXX" placeholders with the appropriate data.

Example use case

Suppose you want to track which social media platform respondents are coming from.

  1. Create a "Source" URL variable, as described earlier, and ensure you publish your changes.
  2. Copy the shareable survey link from the Share page.
  3. Paste the link into a text editor and replace the "XXXX" with values to associate with different social media sources, such as "fb" for Facebook or "1" for a specific platform.
  4. Copy and paste the modified link into your social media post or ad, and repeat the process for other platforms.

Passing data (linking) out

If you’ve read the section on Passing data (linking) in, this process should be easy to follow as it's essentially the reverse, with swapped roles. Let’s summarize the process:

  1. Open the destination platform and configure the link (URL) to accept the necessary parameters (key-value pairs) for receiving data.
  2. Copy the link from the destination platform and paste it into the referring platform (Discover).
  3. Fill in the values with the appropriate data (often requiring scripting to dynamically update the data for each respondent).

In the linking in process, the referring platform was the external platform (e.g., panel provider), and Discover was the destination platform. In the linking out process, the roles are reversed: Discover is the referring platform, and the external platform is the destination.

Start by going to the destination platform (often the panel provider from when we linked into Discover) and locate the link configuration that accepts parameters from Discover. As before, the process of finding and configuring this link will vary by platform, and unfortunately, we can’t provide exact details here.

Once the link is ready on the destination platform, return to Discover. Add (or find an existing) Survey Ending at the bottom of the survey editor. Here, you will paste the destination link into the Redirect URL input box.

For a reminder, the steps for adding a Survey Ending are:

  • Click any Add button.
  • Select the Survey ending option from the Add menu.
  • Set the Respondent status.
  • Choose the ending type (either Instant redirect or On button click).

After pasting the link in the Redirect URL box, notice the message that appears: “Attach variables to the URL by using script tags: https://example.com?id={{id}}”

To dynamically pass data out from Discover, enclose the name of the variable (or survey question) in double curly braces {{ }}. Keep in mind that these values are case-sensitive.

Example of passing a respondent ID

Let’s say you created a "respID" variable to pass a respondent ID into the survey at the start. The destination link expects a parameter called "id" to receive this ID.

You would write {{respID}} in the Redirect URL’s id key-value pair. This dynamically inserts the respondent's ID into the URL before redirecting them to the destination platform.

For example, the final link might look like this:

https://www.panelcompany.com/slkdn23?id={{respID}}

Passing survey data

You can also pass data collected within the survey. Since each survey question is stored as a variable, you can use the question name inside the double curly braces to pass that data.

For example, if you had a "Location" question and the destination platform expects a location parameter in the URL, you would write {{Location}} in the location key-value pair.

The resulting link would look like this:

https://www.panelcompany.com/slkdn23?id={{respID}}?location={{Location}}