Black Friday sale: 25% off your first year on annual plans. Ends Dec 6. Start your trial

Setup & Installation

Install SmartVideo on Teachable

Updated October 19, 2026

Teachable is a hosted platform for selling courses and coaching. Teachable lets you add code to your school, so you install SmartVideo by pasting the Swarmify snippet into your school’s head code and then placing videos in a lesson’s Custom Code block.

If you don’t have a SmartVideo account yet, create one at dash.swarmify.com/signup. Once you’re registered, head back here to get set up.

Step 1: Get your SmartVideo snippet

  1. Log in to your Swarmify dashboard.
  2. Open Player and click Copy snippet under Global install snippet. It’ll look something like this, with your API key in place of YOUR_SWARM_CDN_KEY:
<script data-cfasync="false">
    var swarmoptions = {
        swarmcdnkey: "YOUR_SWARM_CDN_KEY",
        iframeReplacement: "iframe",
        autoreplace: {
            youtube: true,
            vimeo: true
        }
    };
</script>
<script async data-cfasync="false" src="https://assets.swarmcdn.com/swarmcdn.js"></script>

Step 2: Add the snippet to your Teachable school’s head code

Teachable lists Code Snippets for school owners on the Builder plan and above. On the Basic plan, skip Step 2 and paste the Step 1 snippet together with the tag into the lesson’s Custom Code block.

  1. Log in to your Teachable school and select Site.
  2. Click Code Snippets.
  3. Paste the snippet into the Head Code Snippets section, which applies to all users and pages.
  4. Click Save.

Teachable also offers Logged In Snippets and Logged Out Snippets sections that apply code by login state. Use Head Code Snippets for SmartVideo so it loads for students and visitors alike.

Head code snippets don’t apply to SSO login and checkout pages (for example sso.teachable.com), so SmartVideo won’t load on those. See Teachable’s Code Snippets guide.

Step 3: Add a video to a Teachable lesson

Once the snippet is in your head code, place a SmartVideo player in a lesson with the Custom Code block. Teachable lists the Custom Code block on the Basic plan and higher.

  1. In your Teachable admin sidebar, select the course (click View All if it isn’t listed).
  2. Click Curriculum and select a lesson, or create a new one.
  3. In the lesson editor, click Add Content and choose Custom Code.
  4. Paste a SmartVideo tag, replacing the src with your video’s source:
<smartvideo src="https://your-video.example.com/file.mp4"
            width="1280" height="720"
            class="swarm-fluid" controls>
</smartvideo>
  1. Click Save, then Preview the lesson.

Teachable notes that its course compliance features don’t apply to content embedded through the Custom Code block. If you require students to finish a video before moving on, test how that behaves before you rely on it. See Teachable’s guides to adding lesson content and embedding content into lessons.

If the player doesn’t appear, paste the full snippet from Step 1 together with the tag into the same Custom Code block. That works when a block is isolated from the page head; see Using SmartVideo on other platforms.

Teachable’s support can’t debug custom code. If something looks wrong on your school, Teachable suggests temporarily removing your code snippets to see whether they are the cause.

What happens after I install?

After adding the snippet to your school’s head code, SmartVideo will begin scanning your pages for videos. Replace YouTube embeds and Replace Vimeo embeds are on by default on the Player page of your Swarmify dashboard, so the snippet includes autoreplace: { youtube: true, vimeo: true }, and if you have Vimeo embeds in your lessons, they’ll be automatically converted to SmartVideo — no extra work needed. YouTube conversion is best-effort — some videos convert and some don’t. For playback you can rely on, upload the file to your SmartVideo Library or use another supported video source.

SmartVideo imports Vimeo videos whose Who can watch setting is Anyone. To keep those videos private to your own site while SmartVideo serves them, set Where can this be embedded to Specific domains and list your website’s domain. Password-protected and Only me videos stay on Vimeo; change the setting to convert them.

A video usually converts to SmartVideo in about as long as it runs, so a 10-minute video takes about 10 minutes. Confirm conversion with the check in How do I know SmartVideo is working?.

The source behind a <smartvideo> tag must return the video bytes to an anonymous request, without a login, and remain available for as long as the video is embedded. Do not use an expiring or signed URL. That source URL is written into your lesson’s HTML, so anyone viewing the page source can find it.

Need help with SmartVideo tag options?

If you run into any issues, reach out to our support team and we’ll get you sorted!

Evaluating SmartVideo for Teachable? See the Teachable video hosting overview.

Keywords: teachable, course platform, code snippets, head code, custom code block, lesson

Get SmartVideo live on your site

Set it up on WordPress, Shopify, Squarespace, or any platform in a few minutes.

14-day free trial · Card required, no charge until day 15