You can easily show a campaign after video play using Javascript and our MonsterLink feature.
In this article, you’ll learn how to show a campaign after a video has ended.
Before You Start
Here are some things to know before you begin:
- MonsterLinks require a Pro or higher subscription.
- This guide will only function with HTML5 Videos, it is not possible to use this with Flash video.
- Need help creating your HTML5 Video Embed Code? Check out the Video for Everybody Generator for assistance.
- Due to the advanced nature of this guide, at this time we do not provide technical support for implementing any portion of this guide.
Add MonsterLink
To show a campaign after a video finishes playing, follow these steps:
Add MonsterLink
- To begin, create and add a MonsterLink to your site following our guide.
- Next, you’ll edit the MonsterLink by adding some CSS to visually hide it from visitors. For example:
Self-hosted HTML5 Video
If you’re self-hosting your HTML5 video, add the following Javascript to the footer of your site to trigger the MonsterLink when the video ends:
YouTube Video
If you’re using a YouTube video, you can use the YouTube API by following these steps:
Get the YouTube embed iFrame
- Follow these instructions to get the embed iFrame.
- Next, add
?enablejsapi=1
to the end of thesrc
URL. - Finally, add an id attribute to the iFrame,
id="player"
, for example:
Now that you have the embedded iFrame in place add the following JavaScript to the footer of your site:
If you’re serious about jumpstarting your website business growth, then get started with OptinMonster today!
Get Started With OptinMonster Today!BONUS: Done-For-You Campaign Setup ($297 value)
Our conversion experts will design 1 free campaign for you to get maximum results – absolutely FREE!
Click here to get started →