Skip to main content

Quick Start Guide

The Video Donut code snippet is a small piece of JavaScript code that you paste into your pages. It enables Video Donut to load your video by inserting widget.js into the page.

To implement Video Donut on your website:

Copy the following JavaScript code and paste it inside the <head> block on every page of your website that you want to display your video, replacing YOUR-VIDEO-ID with the video ID you would like to use for that page:

!(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');

What happens when this code is installed on your page?

  • Your video will be loaded using the settings from your Video Donut dashboard.
  • A global variable named videodonut is available for future use. It can be renamed by updating the code snippet above.

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