SmartVideo works beyond WordPress when your platform lets the SmartVideo loader run in the same page document as a video element, such as a <smartvideo> tag or an existing Vimeo embed with auto-conversion enabled. Usually that means a head-code field plus an HTML block; builders that sandbox HTML blocks, such as Wix, need the loader and tag together inside one block. Head-code access alone is enough to auto-convert existing Vimeo embeds on the page; adding a SmartVideo tag also needs an HTML block.
SmartVideo does not provide standalone video URLs or iframe embed code. A platform that accepts only approved iframe providers and blocks custom scripts cannot run SmartVideo. If your platform puts custom HTML inside an isolated iframe, the loader must run in that same document as the video element; a loader in the outer page cannot activate it.
Step 1: Get your SmartVideo snippet
Log in to the SmartVideo Dashboard and click the Configuration tab. Choose your settings and copy the generated JavaScript snippet.
The standard loader looks like this. Replace YOUR_SWARM_CDN_KEY with your Swarm CDN Key from the dashboard:
<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>
Keep data-cfasync="false" on both script tags. The standard snippet includes YouTube replacement, but YouTube conversion is best-effort; for reliable playback, download a video you have permission to use and upload it to your SmartVideo Library.
Step 2: Add the snippet to your site
On most platforms, paste the snippet into your site’s <head> section; Wix is the exception (see below). Confirm that your platform and plan also allow the body embed in Step 3.
Shopify
In your Shopify admin, open Online Store, then use the theme’s … menu and select Edit code. Add the snippet before </head> in your theme’s theme.liquid layout and save. See Shopify’s theme-code instructions.
Squarespace
Use site-wide code injection to install the head snippet, then add the video element separately on the page. See our Squarespace installation guide and Squarespace’s code-injection documentation.
Wix
Wix runs Embed HTML blocks in a separate iframe, so a head snippet cannot activate a SmartVideo tag inside one. To add a SmartVideo player, paste the loader snippet and the SmartVideo tag together into one Embed HTML block; no head install is needed. Site-wide Custom Code (Settings > Custom Code under Development & integrations; requires a published site with a connected domain) is only for auto-converting existing videos on the page. Full steps: SmartVideo on Wix.
Webflow
Open Site settings > Custom code, paste the snippet into Head code, and click Save changes. Publish the site for the change to go live. Custom-code access depends on your Webflow plan and permissions; see Webflow’s current requirements and instructions.
ClickFunnels
See our ClickFunnels installation guide for the head snippet and page embed. Confirm which ClickFunnels version you use before following its setup steps.
General HTML sites
Open your site’s main template or layout file and paste the snippet between the <head> and </head> tags.
Step 3: Add videos to your pages
Once the snippet is installed, you have two options for adding videos:
YouTube and Vimeo auto-conversion (on by default): In the Configuration tab, Replace YouTube & Vimeo embeds stays on unless you turn it off, and your snippet then sets both youtube: true and vimeo: true inside autoreplace. SmartVideo detects existing Vimeo embeds on the page and converts them, then plays each one in the SmartVideo player once its conversion is ready. You don’t need to change those embed codes. See Automatic Vimeo conversions.
SmartVideo tag: Add this to an HTML or code block in the page body:
<smartvideo src="https://your-video.example.com/file.mp4"
width="1280" height="720"
class="swarm-fluid" controls>
</smartvideo>
Replace the example src with the source from your SmartVideo Library embed code or a public video-file URL. An external source must return the video bytes without a login and remain available for as long as the video is embedded; SmartVideo re-fetches it for fallback and re-conversion. Do not use expiring or signed URLs. A video usually takes about as long as it runs to convert, and longer when our encoders are busy.
If your CMS strips custom HTML tags
Some platforms strip unfamiliar HTML tags like <smartvideo>. If your CMS allows the required attributes on a <div>, use the smartvideo class instead:
<div class="smartvideo swarm-fluid"
src="https://your-video.example.com/file.mp4"
width="1280" height="720" controls>
</div>
The player recognizes the smartvideo class as well as the <smartvideo> tag. This does not bypass a platform’s script restrictions or iframe isolation.
Building with a JavaScript framework like Angular, React, or Vue? See Using SmartVideo with JavaScript frameworks - the div form is usually the cleaner choice there too.
Platform-specific installation guides
See the installation guide for your platform:
If you run into trouble on a platform not listed here, reach out to support@swarmify.com and we’ll help you get set up.
Keywords: Shopify, Squarespace, Wix, Webflow, ClickFunnels, non-WordPress, install, snippet, head, code injection, custom HTML