Knowledge Base

Search for anything about "All-in-One Video Gallery"

Set Up Video Ads with VAST / VPAID

This is a Premium feature.

Monetize your videos by displaying ads before, during, or after playback—just like YouTube.

Introduction to Video Advertising and VAST

Monetize your videos by displaying ads before, during, or after playback—just like YouTube. However, video ads differ from standard HTML ads (such as Google AdSense banners) that appear on web pages. While HTML ads rely on JavaScript snippets, video ads use a specialized format called VAST (Video Ad Serving Template).

What is VAST and Why is it Important?

VAST is an industry-standard protocol developed by the IAB (Interactive Advertising Bureau) to deliver video ads across different platforms. Instead of embedding JavaScript-based ads, VAST provides an XML URL that a video player (such as the one in our plugin) can read to fetch and display ads dynamically.

Where Do You Get a VAST URL?

To start using VAST ads, sign up with a video ad network such as Google AdSense for Video, SpotX, or Tremor. These networks provide a VAST URL, which you can enter in our plugin’s monetization settings.

For example, if you use Google AdSense for Video (AFV):

  • Unlike regular Google AdSense, which provides a JavaScript snippet, AFV supplies a VAST URL for video ads.
  • Simply copy this VAST URL and paste it into our plugin’s settings to start displaying ads on your videos.

Many video ad networks support VAST, including YuMe, Tremor, SpotX, and Adap.tv. Alternatively, you can create your own ad network using Google Ad Manager. However, this option is best suited for large publishers.

We are also developing an integrated video ad networking feature within our plugin. For more details, check the Upcoming Improvements section.

Enabling Video Ads

  1. Navigate to Video Gallery Settings from your WordPress Admin Dashboard.
  2. Select the Monetize tab, where you will find various options to configure advertisements:
    • Enable Ads: Check this option to display advertisements on your videos.
    • VAST URL: Enter the code provided by your ad network here. Some ad tags include Ad Tag Variables (Macros), which dynamically send data back to the ad server. Click here for a list of macros supported by our plugin.
    • VPAID Mode: If your ad network supports JavaScript creatives, choose one of the following options:
      • Enabled: Allows VPAID ads with default settings.
      • Insecure: Renders ads in a friendly iframe, allowing better interaction.
      • Disabled: Prevents VPAID ads from playing.
    • Google Publisher Tag (GPT): If using Google Ad Manager, enable this option to serve Companion Ads. Learn more.
  3. Save the changes.

Once configured, advertisements will automatically display on all videos on your website.

Overriding Ads on Individual Videos

To disable or override ads for specific videos:

  1. Navigate to Video Gallery All Videos in your WordPress Admin Dashboard.
  2. Edit the desired video.
  3. Locate the Video Ads metabox on the right side of the page.
  4. Choose one of the following options:
    • Disable Ads: Prevents ads from displaying on this video.
    • Override VAST URL: Allows you to specify a different VAST URL for this video.

For users implementing shortcodes:

  • Disable ads: [aiovg_video mp4="video.mp4" ads="false"]
  • Override VAST URL: [aiovg_video mp4="video.mp4" vast_url="YOUR_VAST_URL"]

Companion Ads

Companion Ads appear alongside video ads, similar to YouTube’s layout. For example, when watching videos on YouTube, you may notice that an additional ad loads below the player, complementing the ad content currently playing. This is known as a Companion Ad.

Our plugin supports Companion Ads via the [companion] shortcode or the AIOVG – Companion Ads widget.

Example shortcode: [companion width="350" height="250"]

Important: Ensure the width and height properties are configured to display ads correctly.

Here is an example: AD Tester where you can see how our plugin displays ads on both the video player and the companion slots below the player.

Using GPT Library for Companion Ads

If you have enabled Google Publisher Tag (GPT) under the plugin settings, specify the Ad Unit Path (full path including network and unit codes) in the shortcode: [companion width="350" height="250" ad_unit_path="/124319096/external/single_ad_samples"]

Benefits of GPT:

  • Companion slot awareness.
  • Companion backfill from the publisher’s network, if the VAST response contains fewer companion ads than there are defined slots on the HTML page.
  • Companion autofill if a video ad is missing.
  • Preloaded companion ad slots for click-to-play video players.
  • Automated companion rendering, including HTMLResource and iFrameResource.

Technical Limitations

  • The Video Advertising feature works only with our Custom Video Player. If you add videos via the Third-Party Player Code option, ads will not function, as we cannot control external players.
  • Skippable ads may not work on iPhones due to platform restrictions.

Upcoming Improvements

We are developing a self-hosted ad network system, expected to launch soon. This will allow users to upload ad videos directly via our plugin, offering a seamless monetization experience.

Scroll to Top