Linking surveys and passing data

Introduction

Researchers often use panel providers or other platforms alongside Discover. This article covers how to pass data into Discover and how to pass it back out — a common need when tracking respondents across platforms.

Anatomy of a URL

Passing data into or out of your survey is done through the survey's URL. A URL is made up of four parts: the protocol, domain, subdirectories, and parameters. For our purposes, parameters are what matter most.

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

Parameters carry data through the URL. They appear after ? and are separated by &. Each parameter is a key-value pair: the key is the name of the container, and the value is the data stored in it.

Note: URL parameters are visible to anyone with the link; avoid including sensitive information like passwords.

Passing data (linking) in

Creating variables

Before data can be passed into Discover, you need to create variables to store it. You can do this in two places:

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

To create a variable:

  1. Click + Add variable at the bottom of the table.
  2. Enter a name.
  3. Click Include in URL.
  4. Click Publish to apply your changes.
User interface showing the variable manager and how to add a variable

Once saved, the variable appears in your survey link.

User interface showing where the example survey link is located

Learn more in the Variable manager article.

Filling in the parameter values

With your variables created, the survey link is ready to share with your panel provider or referring platform. Replace the XXXX placeholders in the URL with the actual values to be passed in. Each platform handles this differently, but the general approach is:

  1. Copy the survey link from the Share tab.
  2. Locate where the referring platform redirects respondents to your survey.
  3. Paste the link and replace each XXXX with the appropriate value.
User interface highlighting the Xs that need to be replaced

Passing data (linking) out

Linking out is the reverse of linking in. Discover becomes the referring platform and an external service is the destination.

  1. In the destination platform, locate where it accepts incoming URL parameters and copy that link.
  2. In Discover, scroll to the bottom of the survey editor and add or select a survey ending.
  3. Paste the destination link into the redirect URL field.
  4. Insert variable values dynamically using the format: {{ getValue("variableName") }}

Variable names are case-sensitive. Rather than typing the syntax manually, use the Insert variable button below the input field to choose from available variables and insert them at your cursor position.

Insert Variable Button Survey Endings

Examples

Tracking traffic source (passing in)

To track which social media platform respondents are coming from, create a Source variable and publish your changes. Copy the survey link, then replace XXXX with a value for each platform — for example, fb for Facebook. Paste each modified link into the corresponding post or ad.

Returning respondent IDs (passing out)
If your panel provider expects an id parameter on return, your redirect URL might look like:

https://www.panelcompany.com/slkdn23?id={{ getValue("respID") }}

You can pass multiple values the same way — for example, appending a Location question response:

https://www.panelcompany.com/slkdn23?id={{ getValue("respID") }}&location={{ getValue("Location") }}