SurveyMonkey

Embedding Your Survey or Form on a Website

Use a website collector to embed a survey on your website or popup 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 popup blockers.

We use cookies to stop popups 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 a site. If you already have a collector for your survey, select Website collector.
  3. Choose a website collector type.
  4. Scroll down below the preview to edit the the style and behavior settings, and adjust the collector options.
  5. Click Copy Code to copy and paste the embed code onto 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—your updates will display as soon as you refresh the page.

The live survey preview updates as you customize your style and behavior settings for your survey.

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 settings. 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 or survey stand out.
Sample RateChoose the percentage of visitors to invite to take your survey.
SurveyMonkey brandingTurn the toggle off to hide "powered by SurveyMonkey" from the bottom border. You may also want to remove SurveyMonkey branding from the survey itself.
DelayChoose the timing, in seconds, when your Popup invitation or Popup survey displays after a visitor lands on your page.

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.