Skip to content

GoogleAds_IMA Videos Ads on your page

Daniel Neto edited this page Oct 9, 2024 · 13 revisions

GoogleAds_IMA Plugin for AVideo

The GoogleAds_IMA plugin provides seamless integration with the Google IMA SDK, allowing for compliance with VAST 3.0 and VPAID 2 JS standards. While the plugin name features 'GoogleAds', it's important to note that this plugin is not restricted to Google's services. You can use it with any ad server or company that adheres to the VAST standards.

Configuration and Usage

  1. To use this plugin, you must first apply for an AdSense account or another VAST-compatible service, and follow their respective approval processes.

  2. After approval, you'll receive a unique publisher ID that can be used to request live video ads. Remember to remove all instances of the adtest=on parameter to ensure proper operation.

  3. Should you need more information about the Google AdSense process, you can refer to their tutorial here.

Utilization Beyond Google

This plugin works with any VAST-compatible company. If you're exploring alternatives, consider checking out this list of ad server companies.

User Customization

By enabling a particular option in this plugin, you can provide users with the ability to set their own VAST URLs. This is particularly useful for publishers as it allows them to use custom VAST URLs and align their advertising efforts more closely with their content.

Adding Multiple VAST URLs

The GoogleAds_IMA plugin allows you to add more than one VAST URL. To do this, simply separate each VAST URL with a semicolon (;). This feature provides flexibility in serving ads from multiple sources.

Example

https://example.com/vast1.xml;https://example.com/vast2.xml;https://example.com/vast3.xml

Advanced Customization Options

This plugin supports the use of macros, allowing for dynamic replacements in the ad provider's VAST URL. It's even possible to use PHP code in VMAP tags, providing greater flexibility and precision in how ads are served.

Also, you can use different ad tags (up to 10), which is particularly useful when you want to use the VMAP script for different apps. You can request the VMAP from the different tags using the API.

Customizable VAST URL Placeholders

The GoogleAds_IMA plugin offers the flexibility to dynamically replace specific placeholders within your VAST URLs, allowing you to tailor ad content and tracking data to your needs. These placeholders can be utilized to enhance the ad-serving experience on the AVideo platform.

Here are the available placeholders and their descriptions:

  1. {ip}: Replaced with the viewer's IP address.
  2. {ChannelName}: Substituted with the URL-encoded channel name.
  3. {Category}: Replaced with the URL-encoded category name.
  4. {content_page_url}: Replaced with the content page URL.
  5. {cb}: Substituted with the cache buster value.
  6. {video_duration}: Replaced with the video's duration.
  7. {width}, [CONTENT-DISPLAY-WIDTH], {{WIDTH}}: Substituted with the content display width.
  8. {height}, [CONTENT-DISPLAY-HEIGHT], {{HEIGHT}}: Replaced with the content display height.
  9. {device_id}: Substituted with the device ID.

Additionally, you can use the following placeholders for further customization:

  1. [VIDEO-TITLE-HERE]: Replaced with the clean title of the video.
  2. [ADS-TRACKING-ID]: Substituted with the cache buster value (similar to {cb}).
  3. [DEVICE-USER-AGENT]: Replaced with the URL-encoded user agent of the device.
  4. [LIMIT-TRACKING]: Substituted with a value of 0.

In addition to the above placeholders, you can also use these placeholders for further customization:

  1. {{ENCODED_URL}}: Replaced with the content page URL.
  2. {{CACHEBUSTER}}: Substituted with the cache buster value (similar to {cb}).
  3. {{DURATION}}: Replaced with the video's duration.

To use these placeholders, simply incorporate them within your VAST URL. The GoogleAds_IMA plugin will automatically replace these placeholders with their respective values, ensuring that your ad content and tracking parameters align seamlessly with your AVideo content.

By leveraging these placeholders, you can achieve greater flexibility and precision in how ads are served, enhancing the user experience and maximizing advertising revenue on the AVideo platform.

Troubleshooting

It's common to experience situations where a VAST provider promises video ads but fails to deliver them. In such cases, it's important to check with your ad provider to resolve the issue. However, before doing so, you can ensure that your GoogleAds_IMA plugin is correctly configured by using this test VAST tag:

https://vast.forjesus.tv/vast.xml

This tag is guaranteed to return an ad. If the plugin works with this tag, it confirms that your configuration is correct. If you still don't see ads from your provider, it likely means there's an issue or restriction on their side.

Using Multiple VAST Feeds

The GoogleAds_IMA plugin supports using multiple VAST feed URLs, separated by a semicolon (;). The plugin will attempt to load ads from all the provided feeds in sequence. If an ad fails to load from one feed, it moves on to the next.

Here’s an example using multiple VAST feeds:

https://vast.forjesus.tv/vast.xml;https://company1.vast.xml;https://company2.vast.xml

Using multiple VAST feeds is also useful for identifying issues with specific providers. In the example above:

  • The https://vast.forjesus.tv/vast.xml feed will always return an ad.
  • If ads from other feeds (like https://company1.vast.xml or https://company2.vast.xml) fail to load, but the ForJesus feed still delivers ads, it confirms that your configuration is working, and the problem lies with the specific ad provider(s).

This method helps pinpoint whether the issue is with your setup or with a provider not delivering ads as promised.

Conclusion

By harnessing the GoogleAds_IMA plugin, you can enhance user experience, give more control to your publishers, and boost your advertising revenue on the AVideo platform.

Clone this wiki locally