Skip to content

Embedding Surveys

Embed your survey directly into your website to collect responses without visitors leaving your site.

Embed Options

SurveyReflex provides embed code that you can add to any website.

Getting the Embed Code

  1. Go to your survey’s Details page
  2. Find the Embed section
  3. Copy the embed code

Embed code section Copy embed code from survey details

Iframe Embed

The standard embed uses an iframe.

Embed Code Format

<iframe
src="https://surveyreflex.com/embed/survey/your-survey-slug"
width="100%"
height="600"
frameborder="0"
style="border: none;"
></iframe>

Customizing the Embed

Adjust these attributes:

AttributeDescriptionExample
widthFrame width100% or 600px
heightFrame height600 or 800
styleCSS stylingborder: 1px solid #ccc;

Example: Full Width

<iframe
src="https://surveyreflex.com/embed/survey/your-survey-slug"
width="100%"
height="700"
frameborder="0"
style="border: none; max-width: 800px; margin: 0 auto; display: block;"
></iframe>

Where to Embed

Website Pages

Add to any HTML page:

  • Feedback page
  • Contact page
  • Product page
  • Support page

Blog Posts

Embed in content:

  • Related articles
  • Resource pages
  • Announcement posts

Help Centers

Collect feedback on:

  • Documentation pages
  • FAQ sections
  • Support articles

Web Applications

Integrate into your app:

  • User onboarding
  • Feature feedback
  • Exit surveys

WordPress

Option 1: HTML Block

  1. Edit your page/post
  2. Add an HTML block
  3. Paste the embed code

Option 2: Custom HTML Widget

  1. Go to Appearance → Widgets
  2. Add Custom HTML widget
  3. Paste the embed code

WordPress embed Embedding in WordPress

Squarespace

  1. Edit your page
  2. Add a Code block
  3. Paste the embed code
  4. Save and publish

Wix

  1. Add an Embed element
  2. Choose HTML iframe
  3. Paste the embed code
  4. Adjust size as needed

Shopify

  1. Edit your page in the theme editor
  2. Add a Custom HTML section
  3. Paste the embed code
  4. Save changes

Responsive Embedding

Make your embed responsive for mobile:

<div style="position: relative; width: 100%; padding-bottom: 75%;">
<iframe
src="https://surveyreflex.com/embed/survey/your-survey-slug"
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;"
></iframe>
</div>

This maintains aspect ratio on all screen sizes.

Embed Considerations

Height Recommendations

Survey LengthRecommended Height
Short (1-5 questions)500px
Medium (6-15 questions)700px
Long (16+ questions)900px

Scrolling

  • If survey is taller than frame, scrolling appears
  • Consider taller frame for better experience
  • One-at-a-time display works well in embeds

Mobile Responsiveness

  • Use width="100%" for responsive width
  • Test on mobile devices
  • Consider mobile-specific embed sizes

Security & Privacy

HTTPS

  • Embed URLs use HTTPS
  • Ensure your site also uses HTTPS
  • Mixed content warnings may appear otherwise

Cross-Origin

  • Embeds work on any domain
  • No special configuration needed
  • Response data stays secure

Troubleshooting

Embed Not Showing

  • Verify the survey is published
  • Check the embed URL is correct
  • Ensure iframe is allowed on your platform

Sizing Issues

  • Adjust width and height attributes
  • Use responsive wrapper for mobile
  • Check for CSS conflicts

Survey Not Loading

  • Confirm survey URL is correct
  • Check if survey has expired
  • Verify response limit not reached

What’s Next?