Online Survey Tutorials

SurveyGizmo Tutorials and Help Documentation

Tutorial: Pushing Values into the Survey – Examples: Part 3

This is the continuation of the series for pushing values into your survey through the query string. Make sure to check out Part 1:Query String Basics and Part 2:Query String Integration, if you want to get the background on what the query string is, how it’s displayed within the responses, basic structure and syntax, and how to integrate it within SurveyGizmo, including sending it back out to another website through a redirect.

All of the survey links in this tutorial are live and designed to give you a feel for the behaviours that are described as well as the respondent’s point of view. This section is designed as a general example of start-to-finish functionality of the query string feature, and is not all encompassing. However, it does give a step-by-step look at two of the most common uses of this powerful feature available through SurveyGizmo.

Passing Unique User Information – Panel Company

This example has the following goals:

  • Capture a unique user id for the respondent from the source website
  • Capture personal information such as first and last name
  • Personalize the survey with the first and last name
  • Disqualify users and add extra query string values to represent this
  • Redirect users at the end of the survey back to the website with the userid and personal information

The publish link for this survey is as follows: http://surveygizmo.querystring-panel.sgizmo.com/

The following variable names will be used:

  • User id Number: userid
  • First Name: fname
  • Last Name: lname (this is a lowercase L)

A sample survey link including the query string is as follows:
http://surveygizmo.querystring-panel.sgizmo.com/?userid=12345&fname=John&lname=Smith

Page 1

First and foremost, page 1 includes a Hidden Value action to store the ‘userid’ variable, opening descriptive text that includes the first and last name, and a radio button question that includes simple page jumping if they choose to be disqualified.

Tutorial - query string - panel pg1

At the top of the page the Hidden Value action contains the name ‘userid’ and the value is the merge code for the userid variable: [%%GET_userid]
The second addition is descriptive text which includes the merge code for the first and last name of the individual, in an effort to personalize the survey. Though not used in this example, you could place this merge code inside the ‘Default Value’ of an open text-box question (especially within a Contact Group question) to pre-populate the form with their personal information.

The third addition is question #1, which asks simply whether they respondent wishes to be disqualified. Once the question has been created, clicking on the small gear icon on the left side allows you to setup Simple Page Jumping (not available for free accounts) to jump to page 3, a disqualification redirect that will be discussed later.

Tutorial - query string - panel pg 1 page jumping

Page 2

Tutorial - Panel - page 2Page 2 has a very simple message that confirms that you did not get disqualified. The key for page 2 is that under the Page Options & Logic we have set the default next page to be page 4, the thank you page. This is done so that it skips over page 3, which is our designated redirect page for disqualified respondents. If we did not make this change, everyone who took the survey would go to page 3 and get disqualified, because by default, clicking next page goes to the next sequential page, therefore people on page 2 would end up on page 3 and thus disqualified.

Page 3

Tutorial - panel - pg 3

Page 3 is our disqualification page. This is the page we jump users to when they are disqualified based upon their answers on page 1. This page has only 1 item on it, a Redirect Browser action.

tutorial - panel -page 3 redirect action

The action contains a few key elements:

  • The target URL: www.surveygizmo.com – Where you want respondents to go when redirected for disqualification
  • The hidden value question ‘userid’ is selected as a Field to Pass with the title ‘userid’ (no quotes), passing the userid that the survey captured on page 1 to the target URL
  • An original query string variable/value with the title name of ‘disqualify’ and a default value of 1
    Note: This varies greatly between panel companies; this example is used just for clarity

Page 4

Tutorial - panel - page 4

Finally, page 4 is our Thank You page, and while it still contains the default thank you message, this will never be seen because there is another Redirect Browser action to notify the panel company that the respondent has successfully completed the survey.

tutorial - panel- page 4 redirect

Similar to the redirect action setup on page 3, we have included the target URL of www.surveygizmo.com and included the hidden value field ‘userid’ and made sure to specify that the variable name (’Your Title’ column) will be userid. Note however that there is no disqualification since it has been successfully completed.

I strongly encourage you to see what the query string output looks like from this survey by trying the live survey link for this example use case. Make sure you supply at least a userid to see the power of this example in action. Here is a query string example link for this tutorial: http://surveygizmo.querystring-panel.sgizmo.com/?userid=12345&fname=John&lname=Smith

Capturing Common Values for Reporting – Response Analysis

This example has the following goals:

  • Capture a general category from a survey link
  • Store that value in a Hidden Value action
  • Create a report that displays a graph comparing this information

The publish link for this survey is as follows: http://surveygizmo.querystring-analysis.sgizmo.com/

The following variable name will be used:

  • Department Name: dept
  • Accepted Values:
    • IT
    • Sales
    • HR
    • Union
    • Executive

A sample survey link including the query string is as follows:
http://surveygizmo.querystring-analysis.sgizmo.com/?dept=IT

This use case could have the same results accomplished multiple ways. You could ask the respondent to identify their department (what if they lie?) or you can include this information as part of an email invitation and store it in the hidden value field that way (what if you want to use your own email system?). These are all viable options, but the query string allows you flexibility if you have this information as part of a database that can already generate the proper URL automatically for you. Be aware however, that someone knowledgeable enough (maybe they read this tutorial) could alter the query string prior to choosing to take the survey,but SurveyGizmo’s email invite method described previously removes this ability.

Page 1

Tutorial - analysis - page 1

The key element in this scenario is the Hidden Value action (question 1 is just for fun). The Hidden Value action is required in this scenario because it must be stored as part of the survey within the editor to be available within Reporting. Notice that we are not displaying this information directly to the respondent within the survey, as this data is not relevant to them while taking this survey.

tutorial - analysis - pg1 hidden value

The content here is similar to the examples in Part 2:Query String Integration. The field name has been clarified slightly since it is for reporting rather than simply for inclusion in a Redirect Browser action. The value uses the merge code [%%GET_dept] to grab the value set in the query string variable ‘dept’.

When the respondent completes the survey, the response will now store this hidden value, and the report will be able to display graphs and information based on this value. A section of the ‘modify’ report screen is seen below.

tutorial - analysis - modify report

Per the screenshot above, The Hidden Value action is selectable as an option within this Summary Report.

If you would like to take this survey, please use one of the five links provided below. These are the department examples that are allowed.

Note: While not part of this tutorial, extra code has been added to this survey to restrict access to the survey unless using one of the following links below (to avoid inappropriate values as part of the query string, making it visible in the report that is viewable by anyone).

http://surveygizmo.querystring-analysis.sgizmo.com?dept=IT

http://surveygizmo.querystring-analysis.sgizmo.com?dept=HR

http://surveygizmo.querystring-analysis.sgizmo.com?dept=Sales

http://surveygizmo.querystring-analysis.sgizmo.com?dept=Union

http://surveygizmo.querystring-analysis.sgizmo.com?dept=Executive

If you would like to see what the report would look like without taking the survey, you can also view the online report as well.


If you have any questions or problems, please make use of our forums and the SurveyGizmo community!