Before you start
- Your game is saved in SpinLoop. You can paste the snippet before the game is live: nothing shows to visitors until you turn it on.
- You can edit your theme code in Shopify. Staff accounts need the "Themes" permission.
1. Copy your snippet
In SpinLoop, open your game and go to the Install tab. Copy the snippet. It looks like this, with your own game id:
<script src="https://app.getspinloop.com/embed.js" data-campaign="c_0123456789abcdef" async></script>2. Paste it into theme.liquid
- In Shopify admin, go to Online Store, then Themes.
- Next to your current theme, open the ... menu and choose Edit code.
- In the Layout folder, open theme.liquid.
- Find the closing
</body>tag near the end of the file. Use Ctrl+F (or Cmd+F on a Mac) and search for</body>. - Paste the snippet on the line just above
</body>. - Click Save.
Pasting it in theme.liquid puts it on every storefront page. The triggers you set in SpinLoop decide which pages actually show the game.
3. Allow your store's addresses
The game only loads on sites you list. In the Install tab, under Where it can run, add every address your store uses, one per line:
https://yourstore.myshopify.com
https://yourstore.com
www and the bare domain count as the same site, so you only need one of them.
4. Check it works
- Click Test install in the Install tab.
- Open your store in another tab and browse a page or two.
- The Install tab shows "Installed" once we see the snippet running on one of your addresses.
If you set a delay or a scroll trigger, wait for it, or open the page with a fresh private window so the frequency cap does not hide the game.
If it does not show
- Still waiting after a few minutes? Check the snippet is above
</body>in the theme that is published, not in a draft copy. - Wrong address? Your store may redirect to a domain you did not list. Copy the address from your browser bar into Where it can run.
- Seen it already? The frequency cap hides the game for a while after someone has seen it. Try a private window.
- Game paused or not live? The snippet does nothing until the game is live in SpinLoop.