Embed a contest on your website: link, iframe or pop-up
Direct link, iframe to paste into WordPress, Shopify or Wix, pop-up, subdomain: find the right code to publish your contest on your website.
On this page
Once published, your game has its own web address. You can share it as it is, embed it in a page of your website with an iframe, open it in a pop-up or print it as a QR code. This guide shows where to find each code and how to choose, using Douceria as an example.
Find the URL, the iframe code and the QR code
After publishing, the Déployer (Deploy) button opens the URL de votre jeu (Your game URL) panel. Everything you need to share the game is gathered there.
- 1Voici l'url pour accéder à votre jeu (Here is the URL to access your game): the game's address, here
https://douceria.pinaplay.io/6b0efddc2de54/. The copy icon copies it to the clipboard; the purple button opens it in a new tab. - 2Utilisez ce code pour intégrer le jeu en iframe sur votre site (Use this code to embed the game as an iframe on your website): the complete embed code, to copy with the icon at the top right.
- 3Pour participer sur mobile, les participants peuvent scanner ce QR Code (To take part on mobile, participants can scan this QR code): the QR code opens the same address on a phone.
- 4Enregistrer le QR Code (Save the QR code): downloads the QR code as a PNG image (see Campaign QR code).
The + Créer un canal (+ Create a channel) button, or + Ajouter un canal (+ Add a channel) if other channels exist, publishes the campaign on another channel, with its own URL and QR code. The same items are available from the Voir (View) button in the header: Copier l'url (Copy the URL), Code iframe (Iframe code) and Télécharger (PNG) (Download PNG).
Choose how to publish the game
| Method | Ideal for | Good to know |
|---|---|---|
| Direct link | Newsletter, social media, SMS, a button on your website | The game opens in full page, comfortable on mobile. |
| Iframe | A dedicated page on your website | Visitors stay on your site; your tool must accept scripts. |
| Pop-up | Showcasing the game across your whole website | Depending on your subscription. |
| QR code | Shops, posters, packaging | See Campaign QR code. |
Share the direct link
The address is made up of your channel's subdomain ("douceria") and the campaign's identifier. Use it as it is in a newsletter button, a post, an Instagram bio or a text message.
Embed the game in an iframe
The code provided contains an <iframe> tag that displays the game, followed by two <script> tags that adjust its height. The result: the game takes up the full width of its container and its height adapts to every screen, with no internal scroll bar.
Copy the code
In the URL de votre jeu (Your game URL) panel, click the copy icon of the iframe code, or use Voir (View) then Code iframe (Iframe code).
Choose where it goes on your website
Ideally, create a dedicated page, for example "Jeu de Noël" on Douceria's website, with an eye-catching banner above the game.
Paste the code into an HTML block
In your CMS (WordPress, Shopify, Wix or another), paste the code into a block or element designed for custom HTML, not into a regular text block. The name of this block varies with the tool and the theme: look for "HTML" or "code".
Publish and test
Publish the page, then play through to the result on a computer and on a phone: the height should follow each screen (see Test your game).
Browsers apply stricter privacy rules to embedded content: test the iframe on iPhone as well as on Android. For a mostly mobile campaign, the direct link remains the simplest option.
Show the game in a pop-up
If your subscription includes it, the game can open on top of your website's pages: a teaser window (title, text, image, button) appears in a corner of the page; when clicked, it expands to full screen and shows the game.
Turn on the option
In Paramétrage (Setup), turn on Autoriser l'intégration popup sur site externe (Allow popup embedding on an external website), then click Sauvegarder (Save).
Set up the pop-up
In the Creator Studio, open the Général (General) tab, then Popup Embed. Set the Contenu de la popup (Popup content), meaning the title, text, image and Texte du bouton (Button text), which is "Jouer maintenant" (Play now) by default, then the Placement initial (Initial position): Bas droite (Bottom right), Bas gauche (Bottom left), Haut droite (Top right), Haut gauche (Top left) or Centre (Center).
Choose the trigger
Under Visibilité initiale (Initial visibility), choose Visible dès le chargement (Visible on load) or Masquée (ouverture via event/classe) (Hidden, opened via event or class). In the second case, the pop-up opens when someone clicks an element with the class entered in Classe CSS à écouter (clic) (CSS class to listen for, on click), for example
js-open-game-popup, or on a JavaScript event.Paste the code
Copy the code via Voir (View) then Code Popup (Popup code), and have it added to the code of the pages concerned, for example in the site's shared footer.
Publish on another subdomain
Each website channel corresponds to a subdomain of pinaplay.io, chosen when the channel is created.
- 1douceria: the channel's subdomain; every campaign published on it will have an address like
https://douceria.pinaplay.io/a5bz85x.
For an address on your own domain name, the URL Personnalisée (Custom URL) block offers Contactez-nous (Contact us): this is set up with the Pinaplay team.
Use cases
- Dedicated page: the iframe in a "Jeu de Noël" page, linked from a banner on the home page.
- Pop-up: the teaser window at the bottom right of every page during the campaign.
- Newsletter: a button to the direct link, with
utm_source=newsletter. - Social media: the direct link in your bio or in a story; test it from the app, whose built-in browser will open it.
- Shops: the QR code in the window and at the checkout.
Frequently asked questions
The game is tiny or cut off on my page: why?
The script that adjusts the height isn't running. Check that you pasted the complete code into an HTML block that accepts JavaScript.
Do I need to paste the code again after changing the game?
No. The code points to the game's URL, which doesn't change: your Creator Studio changes show up directly. A duplicated campaign, however, has a new URL.
Can I embed the same game on several websites?
Yes, the same iframe code can be pasted on several pages or websites. You can also publish the campaign on several channels, each with its own URL.
The link shows a "page not found" error: what should I do?
The campaign probably isn't published on the channel of that address. Open Déployer (Deploy) and check the channel. Before the start date, the link shows the waiting screen, which is normal.
Was this guide helpful?
