Shopify

Add Sprig to Shopify

We'll add the snippet to your theme so the share buttons show up across your store. It's a one-time paste — nothing to maintain afterward.

Step 1 · Copy this

Your one-line snippet

This is the only code you'll paste. Logged in? Your API key is already baked in. Otherwise the buttons still work — just untracked until you add a key.

Live demo — click a button to try it
<script src="https://cdn.sprigshare.com/share.js?key=YOUR_API_KEY&api=https%3A%2F%2Fsharewidget-api-988645448815.us-central1.run.app" async></script>

Where it goes: Online Store → Themes → Edit codetheme.liquid, pasted just before the closing </body> tag. For a single page, use a Custom Liquid section instead.

Heads up: Editing theme code is safe and reversible — but if you'd rather not, duplicate your theme first (Themes → “…” → Duplicate) so you always have a backup to roll back to.

2

Open your theme code editor

In Shopify admin, go to Online Store → Themes. On your current theme, click the “…” menu and choose “Edit code.”

📷 Screenshot goes hereThe Shopify Themes screen with the “Edit code” option highlighted in the “…” menu.
3

Open theme.liquid

In the file list on the left, under the “Layout” folder, click “theme.liquid.” This file wraps every page of your store.

📷 Screenshot goes hereThe Shopify code editor with theme.liquid selected under the Layout folder.
4

Paste the snippet before </body>

Scroll to the bottom of theme.liquid and find the closing </body> tag. Paste your snippet (from Step 1 above) on the line just before it, then click Save.

📷 Screenshot goes heretheme.liquid with the snippet pasted just above the closing </body> tag, Save highlighted.
5

Preview your storefront

Open your live store and visit a product or blog page. The share buttons should appear. Hard-refresh if you don’t see them immediately.

📷 Screenshot goes hereA live Shopify product page showing the Sprig share buttons.

That's it — your shares are now tracked.

Want different channels, colors, or a dropdown instead of buttons? Tweak it in the live builder.