Game Direct Embed
Embed an individual game directly on your site.
Overview
Unlike the Full Embed, the Direct Game Embed allows you to embed one of our game formats directly. In this case, the partner likely is featuring the game independently. Upon clicking into the game, the Game Direct Embed will find today's game and serve it as playable within the iFrame.
Setup
Obtain PARTNER_ID
You'll need access to a PARTNER_ID prior to integrating Lil Snack on your website. The PARTNER_ID is a unique identifier that lets Lil Snack where to point to your unique instance of Lil Snack daily games. To obtain an PARTNER_ID, please reach out to hello@lilsnack.co.
Select GAME_TYPE
Additionally, you'll need to have a GAME_TYPE id which points to one of our Lil Snack game types. Supported game types have the following IDs:
- What The: prompt
- Swap: swap
- Downwords: path
- Stacked: stack
- Putt Putt Problems: bucket
- Liar's Quest: liars
- Quoted: quote
- Venn: venn
Embed iFrame
To embed your unique partner Lil Snack experience, embed the following iFrame on your destination page. Replace PARTNER_ID with your provided PARTNER_ID and GAME_TYPE with the game type you want to play. Adjust the width and height of the iFrame based on your sites needs. Note, for mobile, we ecourage partners to use a fullscreen iFrame.
React JSX
<iframe
id="lil-snack-game-direct-embed"
src="https://staging.lilsnack.co/embed-game-direct?partner=PARTNER_ID>=GAME_TYPE"
style={{
width: "380px",
height: "660px",
border: "none",
borderRadius: 8,
}}
loading="lazy"
scrolling="no"
allowFullScreen
></iframe>
An example embed will look something like this:
Deploy
Once successfully integrated, we will deploy your PARTNER_ID to production. Once this happens, you'll simply switch your embed iFrame's URL from:
https://staging.lilsnack.co/embed-game-direct?partner=PARTNER_ID>=GAME_TYPE
To:
https://lilsnack.co/embed-game-direct?partner=PARTNER_ID>=GAME_TYPE
The production lilsnack.co URL will only work and should only be used with approved Lil Snack partners.