Documentation

Show Embedded Content

Article

Show Embedded Content

When and Why to Use

Use this to embed third-party content—currently only YouTube videos—within your survey. This is ideal for:

  • Testing reactions to public video content
  • Presenting branded content hosted externally
  • Gating progression until content has been viewed for a set time
Chat Style
  • Video is centered with the prompt text above
  • A countdown prevents the user from continuing until the specified duration has passed
Traditional Style
  • Layout shifts to embed the video more prominently
  • Countdown behavior is the same
  • Works with both mobile and remote input interfaces
Chat styleTraditionalTraditional - mobile
StandardStandard485769748 b46e15aa 45b2 4187 86c5 37effb4b5ac2
Configuration Options
OptionTypeRequiredDescription
questionstringyesPrompt or instruction to show above the embedded content
urlstringyesYouTube video URL to embed
durationintyesNumber of seconds to lock the screen before advancing
tagss.tag()noUsed in token substitution and reporting
Example Code
from survey import Survey s = Survey(**globals()) s.embed_content( "Watch this video", url="https://www.youtube.com/watch?v=2gcsgfzqN8k", duration=231 )
Notes
  • Only YouTube URLs are supported at this time
  • Users cannot skip ahead; the continue button appears only after the timer expires
  • Use in combination with follow-up questions to assess recall, sentiment, or comprehension