How to make a custom HTML video ad
This article shows you how to create a custom HTML ad item to easily play video files on standard ad zones. For information on creating VAST ads (pre-roll, mid-roll, or post-roll ads in existing video content), read How to create a VAST ad item.
As of this writing, the IAB recommends that video ads should be at most 15 seconds long, with 6 to 8 seconds being the preferred length. The maximum recommended file size for the video creative is 1.1MB. For more information, refer to the IAB's New Ad Portfolio Guidelines (login required).
Before you follow these steps, prepare the video creative to comply with IAB's aforementioned guidelines. If you are going to assign the video ad in a zone with a fixed size, make sure that the video creative's pixel dimensions match the size of the zone.
- Click on Media Library on the left navigation menu, then click on Uploads. The Uploads section of the Media Library will appear.
- Click Add New. The New Creative page will appear.
- Click Choose File then browse for your video creative file.
- Enter a name and description for the creative. (optional)
- Click Save Creative. You will be taken back to the Uploads section, with the video file added to the table of uploaded files.
- Click Copy Link on the far right of the video file's entry on the table. Paste this link into a word processor or any convenient text field, because you will use it on step 9.
- Create a custom HTML ad item in the relevant campaign. For more information, read How to create a custom HTML/Third party tag ad item.
- Paste the following code into the Raw HTML/Script field on the ad item creation page.
<a href="[TRACKING_LINK]" title="" target="_blank"> <video width="300" height="300" muted autoplay loop> <source src="link to your video creative" type="video/mp4" /> Your browser does not support the video tag. </video> </a>
link to your video creativewith the link that you copied in Step 6. Be sure to retain the quotation marks in the code.
- Change the values of
heightto match the dimensions of the creative.
- Change the
typewith the file type of your creative if it's not an MP4 file.
- Click Save Ad Item.
- Assign the campaign to the relevant zone. For more information, read How to assign a campaign to a zone or a channel.