Embedding a Survey in your Website or Email

The most important part of any survey is having your audience participate in it. There are various ways of distributing the survey, and they can all be found by hovering over the title of your survey in your dashboard and clicking Embed:

When clicked a list of options will appear. The left side contains a menu. Clicking on each option will change the right side to show embedding details.

Website Embed

The most flexible embed method, providing you with several ways of embedding a link to your survey. You have the choice of embedding a button, banner, or slider popup:

Clicking on each of these will show settings for that type of embed. At the bottom of each settings section are the codes that you copy and paste into your website:

If you are using WordPress.com then you can paste the WordPress.com shortcode:

Otherwise, copy the JavaScript embed:

JavaScript embeds are explained in more detail below. Note that you must paste the JavaScript code as plain text. If you paste the code into a visual editor then it will display on your website as code.

Note that your website must contain a valid non-quirks mode DOCTYPE. If you don’t know what this then it probably contains one!

Button

The simplest website embed, appearing as a plain text link. You can change the text that appears, the style of the text, and the colour:

The preview area will show you what the embed code will look like.

Banner

A banner displays an image in one of the corners, or the left or right side, of your blog. As with the button, you can change the text and colours, as well as style (corner or side), and alignment (which corner or side).

Slider Popup

The slider popup is a more interactive method of embedding and will display a small dialog that slides onto the page. You can change the title, body, and button text.

Direct Link

The simplest embed method. A URL to your survey will be shown, which can be copied and pasted into a website, email, IM, or sent via any medium.

iPad

If you have an iPad then you can download our iPad app from the App Store and have people complete your surveys directly on an iPad. More details about this can be found on the Polldaddy iPad support page.

Email

This method allows you to embed a survey directly into an email.

You must first have created an email group and have added some email addresses. From the embed screen you can then pick which groups to send the email to, and can customise the text that is sent. Special shortcodes are available that can be inserted into the email:

  • [survey] – Insert the survey directly into the email (note that Outlook 2007 users will only see a link to the survey)
  • [link] – Insert the survey link
  • [firstname] – Target’s first name, as set in the email group
  • [lastname] – Target’s last name, as set in the email group
  • [custom] – Custom data associated with the target

Note that this option is not available on free accounts.

Advanced JavaScript Embeds

You have additional options available with JavaScript embeds.

Can I include multiple embeds on one page?

Absolutely. To make this as efficient as possible, only add the first line of embed code once on your page, and the subsequent lines wherever you want the embed. For example, an embed code looks like this:

<script type="text/javascript" src="http://i0.poll.fm/survey.js" charset="UTF-8"></script>
<noscript><a href="http://surveydaddy.com/s/C743BAD48293B0B2">Take Our Survey!</a></noscript>
<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'
} );
</script>

The first line has been highlighted. This only needs to occur once on your page. The other lines need to occur once per embed. Using this method you will save your users from having to download the Polldaddy code for each embed.

Can I have the survey appear when I click on something else?

Yes, you can make use of the surveydaddy.launch() JavaScript function anywhere on the page. For example, to have a link start the survey:

<a onclick="return surveydaddy.launch(this,'AD28274479EBCD28');" href="http://surveydaddy.com/s/AD28274479EBCD28">Apply Now</a>

Can I change how the slider appears on screen?

You can change the time before the slider appears (delay), and speed at which it appears, when calling surveydaddy.add:

surveydaddy.add( {
  type: 'slider',
  delay: 2000,
  speed: 1500
} );

The values are in milliseconds.

Can I seed values and add custom survey tags?

You can add seed values and survey tags as follows:

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