Our Team Plan lets you add any video ads or other content with our video iFrame option.

This is a great opportunity to show each user a video before you display their quiz results.

In-quiz iFrame – overview

We recommend you check out our handy ‘How to use our video iframe in your quiz’ blog post – it’s chock full of examples and use cases, from a non-technical perspective.

Please read this first to understand the basic concept of video ads in Riddle.

Video iFrame – technical info

Right, now let’s dive in.

To use our video iFrame to show your video content, you’ll need the following:

  1. A server where you can upload an html file – The server needs to be SSL secured, meaning the URL of that server needs to start with https://
  2. A place to host the video – this can be a directory on your server or you can use the embed code from other video hosting services
  • Next, create an HMTL file based on the example below.
  • Make sure to change the video location as noted in the comments in the code.

The code below does the following:

  1. It loads the video and displays a message below the video “Calculating your test results…”
  2. After 4 seconds, that text is replaced with a “Continue” button
  3. Once the button is pressed, the code sends a message to Riddle to show the result page. “window.parent.postMessage(“iframe-complete””,”*”)
  • Now save that HTML file on your server and note down the URL to the file.
  • Paste that URL into the iFrame field on Riddle and disable the skip option.

That’s all it takes.

If you know your way around JavaScript and HTML, you should be able to use the example below to build your own super cool video ad integration with Riddle.

(If you like monetizing quizzes, also check our nifty ‘ad tag’ feature – so you can dynamically show ads to each quiz taker above or below your quiz.)

Video iFrame – live example

That’s enough theory and code for now.

Check out this live example showing our quiz video iFrame in action:

Leave a Comment

Scroll to Top