Wistia is a video platform designed primarily for businesses. Unlike other video hosting services, it has an extremely powerful API that permits access to an array of analytics that gives you insight into how your video is watched and who watches it. We have only just started using it and - as is the case with all embed code that we'll ever use - we wanted a quick and easy shortcode to embed the videos without using the lengthy embed code that Wistia provides. This article will show you how to include a Wistia video into your WordPress website with shortcode. While our shortcode is very basic, we do expect to improve upon it to make the most of the API features . At this stage, however, we just wanted something basic; we'll improve upon it soon.
If we continue with Wistia - and we expect that we will - we'll build a module into our Platform to render the analytics, and we'll also integrate the features with other marketing modules of the Platform. Update, October 2020: Wistia is now fully integrated into our Digital Marketing and Social Media System. Clients should refer to this article which details how it is used.
Our simple shortcode supports basic inline embeds, text link popups, and thumbnail image popups.
To embed a basic inline video, use
[wistia v="bfflqddp8w"][/wistia]. The result is as follows:
Text Link Popup
To show plain text that launches a popup, use
[wistia v="bfflqddp8w" popup="1"]your text in here[/wistia], with a result of . Other than text you can also use images and other objects. The text you use may also be a shortcode itself.
Image Link Popup
To show your video thumbnail that launches a popup, use
[wistia v="bfflqddp8w" popup="1"][/wistia]. The result:
In this case I've reference my own image placeholder with the attribute of
Our shortcode doesn't come close to being complete. If you're interested in the inevitable update, follow us on Facebook or join our mailing list.
Copy and paste the WordPress function into your theme's
functions.php file or, if you sensibly have one installed, your custom functions plugin.
The shortcode attributes listed here are only a small number of those available. When we work out how we'll be using Wistia we'll revisit and rewrite our code.
vis the video ID. The format of a video URL in Wistia looks as follows: https://YourUsername.wistia.com/medias/xxxx, where xxxx is the video ID.
widthas either fixed or responsive to 100% (full width). We've added a responsive container so you can include a responsive video at an initial width of your choosing. Usage:
heightis automatically calculated to fit a normal HD ratio of 16:9. If this doesn't work for you, set the height yourself.
seometadata injection. More information is available from Wistia's SEO page . It's true by default.
popup="1"(the video embeds and plays inline by default).
animation="false". Default: true.
qualityof the video playback by using
quality="540", where 540 is any one of the following: 224, 360, 540, 720, 1080, 3840. The user will still be able to alter their quality once playback starts unless
qualitycontrol(below) is set to false.
qualitycontrol="false"(true by default).
qualityminallows you to specify the minimum quality the video will play at. Wistia will still run bandwidth checks to test for speed, and play the highest quality version at or above the set minimum. Accepted values: 224, 360, 540, 720, 1080, 3840.
image="https://www.beliefmedia.com/full-url-to-image.jpg". The image should be scaled to fit your video.
tracking="false". Default: true. If you're logged into WordPress tracking is false to avoid corrupting your playback data with your own interactions.
googleanalytics="false". Default: true.
- If you're serious about your video marketing efforts, a platform like Wistia is almost essential... until, of course, YouTube makes data available that they already collect. If YouTube were to make more information available, and they provided just a few additional features for marketing purposes, their platform will be unrivaled.
- Full details on Wistia's embed options are available here . API documentation is available here . We've only detailed a small part of Wistia's service.
- If you're looking to try the service for yourself, Wistia provides a free option that includes three videos and 200GB of monthly bandwidth.
- Wistia supports an iframe embed as an alternative to their preferred method. Details are on their website (we've not provided that feature in the shortcode).