Kajabi is a hosted platform for selling courses, coaching, and memberships. Kajabi lets you add custom code to your site, so you install SmartVideo by adding the Swarmify snippet to your site’s header scripts and then placing videos with a Custom Code block on a Website Page or Landing Page.
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
- Log in to your Swarmify dashboard.
- Go to the Configuration tab and copy the snippet shown there. It’ll look something like this, with your Swarm CDN 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 Kajabi site’s header scripts
- In Kajabi, from the Dashboard open Settings.
- Under Site settings, click Site details.
- Under Page scripts, paste the snippet into the Header Page Scripts field.
- Click Save.
Kajabi puts this code in the <head> of every page except offer checkout pages and upsell pages, so SmartVideo won’t load on those. See Kajabi’s custom code guide for the details.
Step 3: Add a video to a Kajabi page
Once the snippet is in your header scripts, place a SmartVideo player on a Website Page or Landing Page with a Custom Code block.
- From the Dashboard, open Website and click the Page Title of the Website Page or Landing Page you want to edit.
- In the page builder, open a Section and click Add block.
- Click Custom Code.
- Paste a SmartVideo tag into the Code field, replacing the
srcwith your video’s source:
<smartvideo src="https://your-video.example.com/file.mp4"
width="1280" height="720"
class="swarm-fluid" controls>
</smartvideo>
- Click Save, then preview or publish the page.
If your site uses Kajabi’s older Premier template, Kajabi documents a different path to the Custom Code block: see Embed custom code to a page with Premier.
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 header; see Using SmartVideo on other platforms.
Course lessons
Kajabi’s lesson documentation describes uploaded media (video, audio) and a text editor for written content, and it doesn’t describe a custom-code field for lessons. We therefore can’t give you a documented place to paste a <smartvideo> tag inside a lesson, and this guide covers Website Pages and Landing Pages only. Kajabi also doesn’t say whether Header Page Scripts run on course pages. If your lessons already embed Vimeo videos, see below, and check one lesson page with the test in How do I know SmartVideo is working?.
Kajabi’s support can’t help write or fix custom code, and Kajabi recommends adding code only from sources you trust.
What happens after I install?
After adding the snippet to your header scripts, SmartVideo will begin scanning your pages for videos. Replace YouTube & Vimeo embeds is on by default in the Configuration tab of your Swarmify dashboard, so the snippet includes autoreplace: { youtube: true, vimeo: true }, and if you have Vimeo embeds on your pages, 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 page’s HTML, so anyone viewing your page source can find it.
Need help with SmartVideo tag options?
- Basic SmartVideo tag options - autoplay, mute, controls
- Advanced SmartVideo tag options - looping, poster images, and more
- How to add a video to a non-WordPress website
If you run into any issues, reach out to our support team and we’ll get you sorted!
Evaluating SmartVideo for Kajabi? See the Kajabi video hosting overview.
Keywords: kajabi, course platform, header page scripts, custom code block, page scripts