Seeding survey data

If you are embedding a survey on your website then you may already have information about the participant. For example, you may know their name and email address. You can use this information to seed a survey with data so that data is pre-filled for them.

Here is an example of a typical survey link:

http://polldaddy.com/s/HE12EE2348B

In your survey if the first question (Q1) is an email address you can seed this in the URL:

http://polldaddy.com/s/HE12EE2348B?q_1_email=test@address.com

q_1 refers to the question number, and email refers to the field in that question.

When the participant starts the survey, the question will already contain their email address.

If you use an iframe to embed a survey add the seeded in the same way to the URL in the iframe code. For example:

http://test.polldaddy.com/s/test-survey?iframe=1&q_1_email=test@address.com

You can seed any number of questions, even questions that are not on the first page. You can use seeding at the same time as custom survey tags.

Seeding details

You must refer to the question using the question number. If you update the survey and this affects the question numbers you will also need to update any seeding information accordingly. The format for the URL parameters are as follows (where N is the question number):

Text
q_N_text – text

Email
q_N_email – email

URL
q_N_url – URL

Number
q_N_value – Number value

Date
q_N_yyyy – Year
q_N_mm – Month
q_N_dd – Day
q_N_h – Hour
q_N_m – Minute

Address
q_N_add1 – Address 1
q_N_add2 – Address 2
q_N_city – City
q_N_state – State
q_N_zip – Zip
q_N_country – Country

Name
q_N_title – Title
q_N_first_name – First name
q_N_last_name – Last name
q_N_suffix – Suffix

Matrix/Likert
q_N_ROW[] – Column position for row ROW

You can add as many choices as necessary for the matrix. Both the row and column values are the position of the row and column respectively, with the first being position 1. For example, to select the 3rd item in row 2 of question 4:

q_4_2[]=3

Multiple choice
q_N_choice[] – Choice position
q_N_other – Other text
q_N_comment – Comment text

You can add as many q_N_choice[] values as needed to select multiple choices. The choice position starts from 1. For example, to seed the third choice in Q4 you would use q_4_choice[]=3. If you are passing a single choice then you can omit the [] from the end of q_N_choice.

Note that all seeding data should be properly URL encoded. For example, the email address test@example.com will need to be encoded as test%40example.com

Encoding data

You may not want the data to be plainly visible on the URL. To work around this you can base64 encode your data.

Take your set of data:

q_1_email=test@address.com&q_2_text=something&q_3_url=website.com

Base64 encode it:

cV8xX2VtYWlsPXRlc3RAYWRkcmVzcy5jb20mcV8yX3RleHQ9c29tZXRoaW5nJnFfM191cmw9d2Vi
c2l0ZS5jb20

And then pass it into the survey using the seeded value URL parameter sv:

http://polldaddy.com/s/HE12EE2348B?sv=cV8xX2VtYWlsPXRlc3RAYWRkcmVzcy5jb20mcV8yX3RleHQ9c29tZXRoaW5nJnFfM191cmw9d2Vi
c2l0ZS5jb20

Seeding surveys with JavaScript

<script type="text/javascript">
  polldaddy.add( {
    type: 'slider',
    title: 'Take Our Survey!',
    body: 'Please help us find out what you think by taking our survey at Polldaddy.com.',
    button: 'Get Started &raquo;',
    pid: 'C743BAD48293B0B2',
    seed: {
      q_1_email: 'test@example.com',
      q_2_url: 'example.com'
    }
} );

Note that you don’t need to URL encode the values. Button popups cannot use seeded answers.

Polldaddy Tweets
%d bloggers like this: