How to Embed a Widget on Shopify

Shopify powers millions of online stores worldwide. By embedding Embeddy widgets on your Shopify store, you can add interactive product configurators, size calculators, compatibility checkers, quizzes, lead capture forms, and more — without writing a custom Shopify app. This guide covers three methods: the no-code Theme Editor, direct theme file editing, and a reusable custom Liquid section.

Beginner–Intermediate~8 min readUpdated 2026

Prerequisites

Before you start, have the following ready:

<iframe
  src="https://embeddy.ai/webhost/WIDGET_ID?widget_props_id=PROPS_ID"
  width="100%"
  height="500"
  frameborder="0"
></iframe>
  • Shopify admin access. You need Owner or Staff access with the Online Store permission to edit themes.
  • An Online Store 2.0 theme (for Method 1 and Method 3). OS 2.0 themes include Dawn, Sense, Craft, and most modern Shopify themes. Older themes may not support Custom Liquid sections.

Always duplicate your theme before editing code. In Shopify admin, go to Online Store > Themes, click the three-dot menu next to your active theme, and select "Duplicate". Edit the duplicate first, then publish it when you are satisfied.

Method 1: Theme Editor — Custom Liquid

Easiest — no code required

The Shopify Theme Editor is the visual customizer built into every Shopify store. On OS 2.0 themes, you can add a Custom Liquid section anywhere on a page and paste your embed code directly — no code editor required.

  1. 1

    Open the Theme Editor

    In your Shopify admin, go to Online Store > Themes, then click "Customize" next to your active theme.

  2. 2

    Navigate to the right page

    Use the page selector at the top of the editor to navigate to the page or template where you want the widget (e.g., Home, a specific page, or a product template).

  3. 3

    Add a section

    In the left panel, click "Add section" at the position where you want the widget to appear. In the section browser that opens, select "Custom Liquid". If you do not see Custom Liquid, your theme may not support OS 2.0 — use Method 2 instead.

  4. 4

    Paste your embed code

    The Custom Liquid section will appear in the left panel with a text area labeled "Liquid code". Paste your Embeddy iframe embed code there.

  5. 5

    Save

    Click "Save" in the top-right corner of the Theme Editor. The live preview on the right should update immediately to show your widget.

Tip: You can also add widgets as blocks inside existing sections (not just as top-level sections). Click "Add block" inside any section that supports blocks, then select "Custom Liquid" or "Custom HTML" if available.

Method 2: Edit Theme Files Directly

Intermediate — requires basic Liquid knowledge

If you want to hard-code the widget into a specific template (e.g., every product page, or a custom page template), you can edit the theme's Liquid files directly. This approach works on all Shopify themes, including older ones that do not support OS 2.0 sections.

  1. 1

    Open the code editor

    Go to Online Store > Themes, click the three-dot menu next to your theme, and select "Edit code".

  2. 2

    Open the target template

    Under the Templates folder in the left panel, open the file you want to modify. Common files are page.liquid (for standard pages) or product.liquid (for product pages).

  3. 3

    Paste the embed code

    Place the iframe inside a wrapper div at the desired location in the template. Here is an example for a product page:

{% comment %} Embeddy Widget {% endcomment %}
<div class="embeddy-widget-wrapper" style="max-width: 800px; margin: 2rem auto;">
  <iframe
    src="https://embeddy.ai/webhost/WIDGET_ID?widget_props_id=PROPS_ID"
    width="100%"
    height="500"
    frameborder="0"
    style="border: none; border-radius: 8px;"
    loading="lazy"
    title="Interactive Widget"
  ></iframe>
</div>
  1. 4

    Save the file

    Click "Save" in the top-right. Visit the corresponding page on your live store to confirm the widget appears.

Remember: Always duplicate your theme before editing files. A mistake in a Liquid template can break your entire storefront. Keep the duplicate as a backup.

Method 3: Reusable Custom Liquid Section

Advanced — merchant-configurable via Theme Editor

For the most flexible setup, create a reusable Liquid section file. Merchants can then add this section to any page via the Theme Editor and configure the embed code there — without touching any code after initial setup. This is ideal for agencies or store owners who want to swap widget IDs from the Theme Editor UI.

  1. 1

    Open the code editor

    Go to Online Store > Themes > Edit code.

  2. 2

    Create a new section file

    In the left panel, find the Sections folder and click "Add a new section". Name it embeddy-widget. Shopify will create a file at sections/embeddy-widget.liquid.

  3. 3

    Paste the section code

    Replace the file contents with the following. The schema block creates a configurable setting that merchants can fill in from the Theme Editor.

{% comment %}
  sections/embeddy-widget.liquid
  Reusable Embeddy widget section — configurable via Theme Editor
{% endcomment %}

<div class="embeddy-section" style="max-width: 900px; margin: 2rem auto; padding: 0 1rem;">
  {% if section.settings.embed_code != blank %}
    {{ section.settings.embed_code }}
  {% else %}
    <p style="color: #999; text-align: center; padding: 2rem;">
      Add your Embeddy embed code in the Theme Editor to display your widget here.
    </p>
  {% endif %}
</div>

{% schema %}
{
  "name": "Embeddy Widget",
  "tag": "section",
  "class": "embeddy-widget-section",
  "settings": [
    {
      "type": "html",
      "id": "embed_code",
      "label": "Embeddy Embed Code",
      "info": "Paste your Embeddy iframe embed code from embeddy.ai/dashboard"
    }
  ],
  "presets": [
    {
      "name": "Embeddy Widget",
      "category": "Custom content"
    }
  ]
}
{% endschema %}
  1. 4

    Save the file

    Click "Save". The section is now available in the Theme Editor.

  2. 5

    Add the section via the Theme Editor

    Go to Online Store > Themes > Customize. Click "Add section" and you will now see "Embeddy Widget" listed under Custom content. Add it, then paste your embed code into the "Embeddy Embed Code" field in the left panel.

Advantage: With this approach, you can update the embed code or swap to a different widget entirely from the Theme Editor — without ever touching code again. This is the recommended method for stores that frequently update their widgets.

Embedding on Product Pages

Product pages are one of the most powerful places to embed an Embeddy widget. Common use cases include:

  • Size calculators — help shoppers find the right size before purchasing
  • Compatibility checkers — ensure accessories or parts work together
  • Product configurators — let customers customize color, engraving, or options
  • ROI or savings calculators — demonstrate value for high-ticket items

To embed on every product page, use Method 2 (edit product.liquid) or Method 3 (add the custom section to the Product template in the Theme Editor).

To embed on only specific products, create a separate page template (e.g., product.with-widget.liquid) and assign that template to specific products from the product editor sidebar.

Troubleshooting

I do not see "Custom Liquid" in the Theme Editor

Custom Liquid sections require an Online Store 2.0 theme. Check your theme version in Online Store > Themes. If your theme is not OS 2.0, use Method 2 (edit theme files directly) or upgrade to a modern Shopify theme like Dawn.

The widget shows a blank area or loading spinner indefinitely

Verify that your Widget ID and Props ID in the embed URL are correct. Copy the embed code fresh from the Embeddy dashboard and ensure your widget is published (not in draft mode).

The widget is blocked — Content Security Policy (CSP) error

Some Shopify themes or third-party apps add strict CSP headers that block external iframes. Check your browser's developer console (F12) for a CSP error mentioning frame-ancestors or embeddy.ai. If you see this, contact your theme developer or the app causing the restriction to allow embeddy.ai as a trusted source.

My theme changes broke the storefront

This is why duplicating your theme before editing is essential. Go to Online Store > Themes, find your original (un-edited) theme in the theme library, and click "Publish" to restore it instantly.

Widget is cut off on mobile

Ensure the iframe has width="100%". Wrap the iframe in a div with overflow: hidden if horizontal scrolling appears. You may also need to reduce the height value for mobile breakpoints using media queries in a CSS file.

Frequently Asked Questions

Will embedding a widget affect my Shopify store's page speed score?

Iframes load independently and do not block your main page render. Using loading="lazy" defers loading until the widget is visible, which helps maintain a good Largest Contentful Paint (LCP) score. Embeddy's infrastructure is optimized for fast global delivery.

Can I show a different Embeddy widget on different products?

Yes — the cleanest way is to create multiple Shopify page templates (e.g., product.calculator.liquid, product.quiz.liquid), each embedding a different widget ID. Then assign the appropriate template to each product from its product editor page.

Does this work on Shopify's Starter plan?

The Shopify Starter plan does not include the full Online Store section (Theme Editor or code editing). You would need at least the Basic Shopify plan to access the Theme Editor and edit theme code. On Starter, you can still use Embeddy embed codes if you are embedding on an external site that links to Shopify.

Ready to supercharge your Shopify store?

Build a free interactive widget — size calculator, product configurator, quiz, or anything you need — and embed it on your store in minutes.

Create your free widget at embeddy.ai