SurveyMonkey

Embedding Your Survey or Form on a Website

PAID FEATURE: This feature is only available to customers on paid plans.

Use a Website collector to embed a survey on your website or pop-up a survey invitation. To add one, you only need a basic understanding of HTML and access to your website’s source code. We’ll give you an embed code you can copy and paste.

You can embed only 1 survey on a single page on your website.

TypeDescription
Embedded SurveyEmbed your survey on any page of your site so people can take it right there.
Popup InvitationPop-up an invitation modal that gives people the option to take your survey. The survey opens in a new browser tab.
Popup SurveyOpen your survey in a pop-up modal when people visit a page, without needing to embed the survey in the page layout.

Popup Invitations and Popup Surveys show in modal windows that float above your webpage. Modal windows don't require your site visitors to load a new page, and they aren't affected by pop-up blockers.

We use cookies to stop pop-ups or embedded surveys from reshowing if someone already answered, declined, or closed the survey. If someone clears their cookies, visits your site using a browser that blocks or disables cookies, or the website is opened in a new browser session, the collector can’t remember whether they’ve taken the survey or declined it, so the popup may appear again allowing additional responses.

When you close your survey, it continues to display on your website, unless you remove the embed code from your site.

To create a Website collector:

  1. Go to the Collect Response section of your survey.
  2. Choose Embed on Website. If you already have a collector for your survey, select Website Collector.
  3. Choose a website collector type.
  4. Scroll down to edit the appearance settings, control the survey experience, and adjust the collector options.
  5. Click Copy Code to copy and paste the embed code on a page in your site.
    • When embedding a survey, paste the script into your HTML wherever you want the survey to appear on your page.
    • When showing a Popup Invitation or Popup Survey, paste the script into your HTML immediately before your closing </body> tag.

The code only needs to be added once. You don’t need to update the Embed code if you make changes to your survey or collector options—updates will display automatically as soon as you refresh the page.

When you customize the appearance settings, you can preview how the survey will look:

Display SettingDescription
HeadlineCatch your visitor’s attention with a headline that’s no more than 2 lines. You can edit the text, but not the font, size, or color.
MessageExplain the goal of the survey in 1 – 3 short sentences. You can edit the text, but not the font, size, or color.
Primary ButtonThis button opens your survey. You can edit the button text, button color, and button text color.
Secondary ButtonThis button closes the invitation window. You can edit the button text, button color, and button text color.
Width and HeightSpecify how many pixels wide or tall you want the survey to be. When using the Embedded survey type, turn on the Custom size toggle to access these controls. If you leave the toggle off, your survey will match the width of the HTML element containing your survey or form.
BorderEdit the border color to help your invitation stand out.
Sample RateChoose the percentage of visitors to invite to take your survey.
Hide SurveyMonkey BrandingHide "powered by SurveyMonkey" from the bottom border. You may also want to remove SurveyMonkey branding from the survey itself.

Update the collector options to customize the survey experience. Some collector options are limited on certain website collector types:

  • Embedded Surveys don't have a Survey End Page option.
  • Instant Results aren't available on any Website Collector type.
  • The Custom Thank You includes SurveyMonkey branding at the end of an Embedded Survey, even if you chose to Hide SurveyMonkey Branding.

Please don’t edit the Embed code! The Embed code contains several lines of JavaScript and a unique ID that's tied to both your collector and your survey.

If you use templates to dynamically generate pages for your site (if you’re using Ruby, Python, PHP, ASP, or a similar technology), you can paste the Embed code snippet into its own file, then include it in your page layout.

If you’re using wordpress.org, you need to be an administrator to add the code, or a super admin for multi-site wordpress.org networks. Website collectors aren’t compatible with wordpress.com.