All Collections
The Pop-Up
Adding a game to a pop-up
Adding a game to a pop-up

How to iframe a campaign into a Playable pop-up

Andreas Grosen avatar
Written by Andreas Grosen
Updated over a week ago

In addition to sending out your campaign URL or iframing the game into your website, you can also embed a game in a pop-up.

However, there are some limitations to this functionality.

  • Embedding the game in a pop-up significantly increases the load time of both your website and the pop-up itself.

  • The game experience can be compromised because of how little room there is to play within the pop-up. This is mostly a problem for games where the player has to move things around, such as a drop game or a priority puzzle.

The easiest way around these limitations is to link from the pop-up to the game instead of putting the game in the pop-up. But if you are sure you want a game in a pop-up, this article will show you:

  • How to add a game to a pop-up

  • Your options for displaying the game in the pop-up

  • Tips for optimizing design and performance

  • Recommended game types

Add the game to the pop-up

To embed your game, open your Playable pop-up and add the game addon.

Then, go under the addon settings and select the campaign you want to embed from the dropdown menu. Since this works like an iframe, only live games can be added (not drafts or templates).

Game display options (addon settings)

There are different settings you can adjust once the game is embedded. Essentially, the game addon is an iframe, so the settings are similar to those you find when you iframe a game into a website.

Show only game section

You can decide if you want to include your entire campaign landing page or just the game flow section.

Generally, we recommend to show only the game flow section, since the other content (e.g. logo and footer) don't make sense in the pop-up.

Show scrollbars

If the game is taller than the iframe, then it will be cropped.

If you add scrollbars, then the player will be able to scroll within the iframe to see the rest of the content.

Responsive height

If you have different amounts of content on your game flow pages, this setting will allow the game addon change size so that it always fits the height of the game.

However, this does not change the height of the pop-up that contains the game addon! Read more below for our recommendations on how to handle game height in your pop-up.

Media queries

Media queries allow the game to respond to the size of the screen on which it is displayed. By default, the setting is turned off, meaning the game will adjust to the size of the pop-up.

If you turn the "ignore media queries" setting on, the desktop version of the game will show, even if the pop-up is the size of a mobile screen.

Tips for optimizing design and performance

Pop-up size

We recommend a slightly larger pop-up than usual if you are embedding a game in the pop-up:

  • Desktop: 800px wide x 500px tall

  • Mobile: 320px wide x 500px tall

You can also create a pop-up that is only visible on desktop and not on mobile, if you cannot create a game small enough to fit in a mobile pop-up.

Game size

You can adjust the game's design to make it a bit smaller, allowing you to fit it into the small pop-up window:

  • Margin and padding: remove the 30px of default padding at the top and bottom of the game flow section and the game flow pages. The pop-up will add its own padding around the game addon.

  • Full width: set the game flow section to full width and remove the column gap to ensure the game content fills the entire width of the iframe.

  • Image sizes: design all images and graphics based on the mobile recommendations, since the height of the pop-up more closely matches a mobile screen than a desktop screen

  • Font size: reduce the size of your fonts, especially headers, so they don't take up too much space

Pop-up height and game height

Most games have different amounts of content on different flow pages (e.g. the registration page is taller than the presentation page). This could mean your game content gets cropped if it is taller than the pop-up itself.

You have two options for preventing this:

  • Enable responsive height in the game addon and set a responsive height for the pop-up. The height of the pop-up will change based on the height of the game. Warning: if you have too much content, this could result in the pop-up being taller than the screen on mobile (making it impossible to play or exit the pop-up), so make sure to test thoroughly!

  • Allow scrollbars and set a fixed height for the game addon that matches the height of your pop-up. This creates a consistent experience for the player, but you have to make sure your game content fits within the height of the iframe. A scrollbar is better than cropping, but is still not the best user experience.

Improving load time

Iframing a game into a pop-up, can increase the load time of both your website and the pop-up itself.

It's not possible to make the website load faster, but you can make the pop-up load faster. You do this by creating the first page of the game as a pop-up step, so the full game doesn't load until the player clicks to continue.

  • Step one: a presentation page

  • Step two: the game addon

Watch the video below to learn how to create this two-step pop-up.

Recommended game types

Technically, any game can be embedded in a pop-up โ€” but some games work better than others.

Generally, the best kinds of games are simple ones where the player doesn't have to interact with too many different moving elements.

Some of the best game types for embedding in a pop-up are:

  • Wheel of fortune / Spin the bottle

  • Scratchcard

  • Slot machine

  • Quiz

  • Personality test

  • Survey

  • Poll

  • Calendar (single-door only)

Some of the games we don't recommend embedding in a pop-up are:

  • Drop game

  • Shoot it

  • Hit the target

  • Snake

  • Priority puzzle

  • Swipe it

  • Puzzle

  • Place the item

If you have questions about a specific game, contact your Customer Success Manager or write to us in the support chat.

Did this answer your question?