Skip to main content


Do you want to add the Video Donut JavaScript code in your Shopify pages? You may want to add it to your entire website or into specific pages. We will show you how to easily add JavaScript in Shopify pages.

  1. From your Shopify admin, go to Online Store > Themes.
  2. Find the theme you want to edit, and then click Actions > Edit code.
  3. Under Assets, click on to Add a new asset
  4. A dialog popup will appear. Switch to Create a blank file tab. You must to fill the name for new file (eg: videodonut-custom) and select .js.liquid.
  5. Click Add asset. This is the custom JS file you’ll be editing to add your custom JS.
  6. Now, select the asset file you just created and paste the following code:
!(function (w, d, s, o, f, js, fjs) {
w[o] = w[o] || function () { (w[o].q = w[o].q || []).push(arguments) };
js = d.createElement(s); = o; js.src = f; js.async = 1;
fjs = d.getElementsByTagName(s)[0]; fjs.parentNode.insertBefore(js, fjs);
}(window, document, 'script', 'videodonut', ''));
videodonut('init', 'YOUR-VIDEO-ID');
  1. Click Save.
  2. Under Layout, select theme.liquid.
  3. Scroll down the page until you find the closing body tag (</body>).
  4. Paste the below code just before the tag:
{{ 'videodonut-custom.js' | asset_url | script_tag }}
  1. Click Save and you're done! You can click on Preview to see what your video-donut looks like!

Ready to Grow Your Business?Start using Video Donut today.

Add a stories-style video to your website to boost engagement and conversions.

Sign up for Free