# Embed Shoprocket on any website

> Sell from the website you already have. Create an embed in Embeds, click Get code, and paste it into your page on WordPress, Squarespace, Wix, Webflow or plain HTML. Changes you save later reach every page with no re-paste.

Help Centre / Embedding - Updated 29 November 2026

An embed puts part of your shop on any website: one product with a buy button, a full product catalog, your categories, or a search box. You build it in **Embeds**, click **Get code**, and paste the code into your page. The cart and checkout open right on your page, so customers never leave your site.

You only paste the code once. When you change an embed later, even switching it to a different layout, every page it is on updates when you save.

## Before you begin

- Add at least one active product. An embed for one product needs a product to sell.
- You need to be able to edit your website and add a code or HTML block to a page. Each site builder has its own step-by-step guide, listed under Step 4.

## Step 1 (optional, recommended): Add Shoprocket to every page of your site

At the top of **Embeds** is a card called **Add Shoprocket to every page of your site**. It holds one line of code for your site's header. With it in place, your floating cart and live chat work on every page of your site, not only the pages with an embed, and any embed you add later just works.

1. In your dashboard, go to **Embeds**.
2. On the **Add Shoprocket to every page of your site** card, click **Copy**.
3. Choose your site builder from the tabs under the code (**HTML**, **WordPress**, **Squarespace**, **Wix** or **Webflow**) and follow its two steps to paste the line into your site's header.
4. Open any page of your site. The card's status changes from **Not seen yet** to show where Shoprocket is running.

The card checks your whole site, not just one page. Once you have added your website address in **Settings**, we read your site's pages once a day, and we also pick up the pages your customers arrive from. If you sell on more than one website and have added the others under **Other sites you sell on**, we check each of them too. The status then shows one of these:

- **Not seen yet**: Shoprocket hasn't run on your site yet.
- **On 3 of 24 pages** (the numbers are your own): some pages of your site don't have the line yet. The card lists up to five of them. Add the line to your site's header, then click **Check again** to have us read your pages straight away. You can use it again after a few minutes.
- **On every page**: every page we found on your site has it.
- **Stopped on 1 site**: Shoprocket was running on one of your websites and has stopped. See [If Shoprocket stops working](#if-shoprocket-stops-working).

You can skip this step. Every embed's code includes the same line, so an embed works on its own on any page.

### Why every page?

Shoprocket can only see and help on pages that have the line:

- **You can see where your sales come from.** When a customer clicks your ad or your newsletter and lands on a page without the line, we never see where they came from. If they then buy on your shop page, the sale shows as **direct**, so you can't tell which ads and emails are working.
- **Your analytics count every visit.** Visits, top pages and live visitors only count pages with the line, so **Analytics** shows a note while some pages are missing.
- **Customers can reach their cart from any page.** Pages without the line have no cart button, so a customer who has added something can't get back to their cart from them.
- **Live chat works everywhere.** It only appears on pages with the line.

The line is small and doesn't slow your pages down. It is about 2 KB. On a page with no embed, it then loads your cart and the rest of Shoprocket (about 280 KB compressed) in the background, after your page's own content has loaded. Your page appears just as quickly.

### If Shoprocket stops working

We keep an eye on every website you have added in **Settings**. Once Shoprocket has been running on one of them for a couple of weeks, we notice if it stops. We treat it as stopped when we have not seen it on that site for three days, and our daily check finds no Shoprocket code on the site's pages or can't load the site at all.

When that happens, we email you once. The warning also shows on the card in **Embeds** and in **Settings** > **General**, and it names the site.

This usually happens after a theme change, a site builder update or an edit to the site's header that removed the line. To fix it:

1. In **Embeds**, copy the line on the **Add Shoprocket to every page of your site** card.
2. Paste it back into that site's header, using the steps for your site builder on the card.
3. Open a page of the site. The warning goes away as soon as Shoprocket runs there again.

If you no longer use that site, remove it in **Settings** > **General** and we will stop checking it. A few quiet days with no visitors won't trigger the warning by themselves, because we also check the site itself.

## Step 2: Create an embed

1. In **Embeds**, click **New embed**.
2. Under **What it shows**, pick one: **One product**, **Product catalog**, **Categories** or **Search**.
3. Pick a layout:
   - **One product**: **Button**, **Compact**, **Card**, **Feature** or **Full detail**. Then pick the product under **Which product?**
   - **Product catalog**: **Grid**, **Carousel** or **List**. Under **Which products?** choose **All products**, **A category** or **Hand-picked**.
   - **Categories**: **Tiles**.
   - **Search**: **Search box** or **Search icon**.
4. Click **Continue**.

Every layout is the same embed with different settings, so you can switch layout later in the editor and the code you paste stays the same.

![The New embed screen with Product catalog chosen and the Grid, Carousel and List layouts to pick from](https://shoprocket.io/img/help/embed-on-any-website/new-embed-chooser.webp)

## Step 3: Customise it

The editor shows a live preview you can click through as a customer would. You can add to cart, open products and check out. Change what the embed shows in the **This embed** tab. The **Store design** tab sets your colours and fonts for your whole store, so all your embeds and your floating cart match.

The embed gets a name to start with, such as "Products · Grid". You can rename it at any time.

When you're happy, click **Save & get code**.

## Step 4: Copy the code and paste it into your site

After saving, the **Get code** panel opens. It looks like this:

```html
<!-- Shoprocket: Product catalog -->
<script src="https://.../loader.js" data-pk="pk_..."></script>
<div data-shoprocket="embed" data-embed-id="emb_..."></div>
```

Always copy your own code with the button, never retype it. The first line names the embed, the script loads Shoprocket for your store, and the last line is where the embed appears.

![The Get code panel with site builder tabs, the embed code and the Copy code button](https://shoprocket.io/img/help/embed-on-any-website/get-code.webp)

1. Click **Copy code**.
2. Choose your site builder from the tabs in the panel and paste the code where the embed should appear:
   - **HTML**: paste the code where the embed should appear. The script line only needs to be on a page once, however many embeds it has.
   - **WordPress**: in the block editor, add a **Custom HTML** block where the embed should go. Paste the code and update the page. On WordPress.com, scripts need a plan that allows plugins.
   - **Squarespace**: edit the page and add a **Code** block where the embed should go. Paste the code, keep the display set to HTML, and save.
   - **Wix**: in the editor, choose **Add**, then **Embed code**, then **Embed HTML**. Paste the code into the box and resize it to fit. Wix shows it in a frame, so give it room for the cart.
   - **Webflow**: drag a **Code Embed** element where the embed should go. Paste the code, save, and publish the site.

Each site builder has a full guide, with the plan it needs and what to check if the shop doesn't appear:

- [WordPress](https://shoprocket.io/help/add-shoprocket-to-wordpress.md), including Elementor and WordPress.com
- [Squarespace](https://shoprocket.io/help/add-shoprocket-to-squarespace.md)
- [Wix](https://shoprocket.io/help/add-shoprocket-to-wix.md)
- [Webflow](https://shoprocket.io/help/add-shoprocket-to-webflow.md)
- [Carrd](https://shoprocket.io/help/add-shoprocket-to-carrd.md)
- [Ghost](https://shoprocket.io/help/add-shoprocket-to-ghost.md)
- [Framer](https://shoprocket.io/help/add-shoprocket-to-framer.md)
- [Showit](https://shoprocket.io/help/add-shoprocket-to-showit.md)
- [Unbounce](https://shoprocket.io/help/add-shoprocket-to-unbounce.md)
- [IONOS](https://shoprocket.io/help/add-shoprocket-to-ionos.md)
- [Blogger](https://shoprocket.io/help/add-shoprocket-to-blogger.md)
- [Hostinger](https://shoprocket.io/help/add-shoprocket-to-hostinger.md)
- [Jimdo](https://shoprocket.io/help/add-shoprocket-to-jimdo.md)
- [Square Online and Weebly](https://shoprocket.io/help/add-shoprocket-to-square-online.md)
- [Bubble](https://shoprocket.io/help/add-shoprocket-to-bubble.md)

On a desktop builder such as Nicepage or Xara, add an HTML element (in Xara, an HTML placeholder) where the shop should go, paste the code into it, and publish. If your builder doesn't allow code at all, see [Sell from a site that doesn't allow code](https://shoprocket.io/help/sell-from-a-site-that-doesnt-allow-code.md).

If you already added Shoprocket to your site's header in Step 1, the page only needs the last line of the code, the one starting `<div`.

To get the code again later, open the embed from **Embeds** and click **Get code**.

**No website?** For one product with no options, the **Get code** panel also offers **No website? Share a buy link**. Click **Copy link** and share it anywhere. The link opens checkout with that product. For a product with options, you make the link on the product's own page instead, where you pick which option it is for.

**You can add search to your site's menu.** For a **Search** embed, the panel also gives you a link, `#!/search`, to add as a menu item called Search on your site. It opens the same search on any page with a Shoprocket embed, with no code needed.

## The floating cart

Your store has one floating cart. It is the button customers click to open their cart and check out, and it appears on every page your Shoprocket code runs on. In **Embeds** it is the first row, **Floating cart**, marked **Always on**.

To change how it looks, click **Floating cart**. You can set its **Position** on the page edge, its **Distance** from the side and top or bottom, what it **Shows**, its **Shape**, **Size** and **Icon** (or your own image), and whether a **Sign-in** link is shown. Click **Save**. Its colours and fonts come from your store design.

## Changing or removing an embed

- **Change it**: open the embed from **Embeds**, make your changes and click **Save**. Every page showing it updates. No new code is needed.
- **Copy it**: to make the same embed for another page, click the copy button on its row in **Embeds**, or choose **More**, then **Duplicate embed**, in the editor. The copy has the same layout, design and settings, is named after the original with "copy" added, and opens in its editor, where you change what differs (a different category, say). It gets its own code to paste. If you have unsaved changes in the editor, save them first, because the copy is made from the saved embed.
- **Remove it from a page**: delete the code from that page on your website.
- **Delete it**: in **Embeds**, use the delete button on its row and confirm. Take its code off your pages too.

## For developers

The developer guide covers every option on the code, showing an embed without the dashboard, and the JavaScript the widget offers: [Embed the widget](https://shoprocket.io/docs/embedding.md).

## Related

- [What is Shoprocket?](https://shoprocket.io/help/what-is-shoprocket.md)
- [Connect your Stripe account](https://shoprocket.io/help/connect-stripe.md)
- [Your hosted shop](https://shoprocket.io/help/your-hosted-shop.md)

[Open Embeds in your dashboard](https://app.shoprocket.io/go/embeds)

---

- HTML version: https://shoprocket.io/help/embed-on-any-website
- Language: English (en)
- Also in: [العربية](https://shoprocket.io/ar/help/embed-on-any-website.md), [Deutsch](https://shoprocket.io/de/hilfe/auf-jeder-website-einbetten.md), [Ελληνικά](https://shoprocket.io/el/help/embed-on-any-website.md), [Español](https://shoprocket.io/es/ayuda/integrar-en-cualquier-sitio-web.md), [Français](https://shoprocket.io/fr/aide/integrer-shoprocket-sur-un-site.md), [עברית](https://shoprocket.io/he/help/embed-on-any-website.md), [हिन्दी](https://shoprocket.io/hi/help/embed-on-any-website.md), [Bahasa Indonesia](https://shoprocket.io/id/bantuan/sematkan-di-situs-mana-pun.md), [Italiano](https://shoprocket.io/it/aiuto/incorpora-shoprocket-su-qualsiasi-sito.md), [日本語](https://shoprocket.io/ja/help/embed-on-any-website.md), [Lietuvių](https://shoprocket.io/lt/pagalba/iterpkite-shoprocket-i-bet-kuria-svetaine.md), [Norsk](https://shoprocket.io/nb/hjelp/bygg-inn-shoprocket-pa-et-hvilket-som-helst-nettsted.md), [Nederlands](https://shoprocket.io/nl/hulp/shoprocket-op-elke-website-insluiten.md), [Polski](https://shoprocket.io/pl/pomoc/osadz-shoprocket-na-dowolnej-stronie.md), [Português](https://shoprocket.io/pt/ajuda/embed-em-qualquer-site.md), [Română](https://shoprocket.io/ro/ajutor/incorporeaza-shoprocket-pe-orice-site.md), [Русский](https://shoprocket.io/ru/help/embed-on-any-website.md), [ไทย](https://shoprocket.io/th/help/embed-on-any-website.md), [Türkçe](https://shoprocket.io/tr/yardim/web-sitesine-gomme.md), [中文](https://shoprocket.io/zh/help/embed-on-any-website.md)
