-
Notifications
You must be signed in to change notification settings - Fork 978
GoogleAds_IMA Videos Ads on your page
The GoogleAds_IMA plugin integrates with the Google IMA SDK, supporting VAST 3.0 and VPAID 2 JS standards. Despite its name, the plugin is not limited to Google Ads services. It works with any VAST-compliant ad server, offering powerful customization and control over video ad placement.
- Follow the service's approval process.
- Upon approval, you will receive a publisher ID for live video ads.
- Ensure all instances of
adtest=on
are removed for ads to function in a live environment.
- For help with the AdSense setup process, refer to their tutorial here.
The plugin is compatible with any VAST-compliant ad server. If you’re not using Google Ads, consider exploring other providers. A useful list of ad server companies is available for reference.
-
Parameter:
adTagUrl
- Description: The main URL for serving ads.
- Default Value: A sample URL provided for Google Ads.
-
Configuration: Replace this with your VAST-compliant ad server URL(s). Multiple URLs can be added, separated by semicolons (
;
).
-
Parameter:
adTagUrlForKids
- Description: Used for videos marked as "made for kids."
- Configuration: Provide a separate URL tailored for kid-safe ads.
-
Parameter:
preAdTagUrl
- Description: This URL is used specifically for pre-roll ads, which play before the video starts.
- Configuration: Add a dedicated pre-roll tag if required.
-
Start:
-
Parameter:
start
- Description: Enables ads at the start of the video.
-
Parameter:
-
25% Progress:
-
Parameter:
mid25Percent
- Description: Plays ads when 25% of the video is watched.
-
Parameter:
-
50% Progress:
-
Parameter:
mid50Percent
- Description: Plays ads when 50% of the video is watched.
-
Parameter:
-
75% Progress:
-
Parameter:
mid75Percent
- Description: Plays ads when 75% of the video is watched.
-
Parameter:
-
End:
-
Parameter:
end
- Description: Enables ads at the end of the video.
-
Parameter:
The plugin allows you to define when ads should play during videos or live streams. The configuration works seamlessly for both Video On Demand (VOD) and live streams using the following rules:
- Provide exact times, separated by commas (e.g.,
10,60,130,190
). Ads will play at these specific moments during the video or live stream:-
Example:
10,60,130,190
will play ads at 10, 60, 130, and 190 seconds.
-
Example:
- Important: If more than 4 times are specified, ads will play only at these specific moments and will not repeat at regular intervals.
- For repeating ads during videos or live streams, provide 1, 2, or 3 values:
-
Single Value:
-
Example:
60
Ads will repeat every 60 seconds (e.g., 60, 120, 180...).
-
Example:
-
Two Values:
- Valid formats specify pre-roll or post-roll combined with an interval:
-
0,60
: Pre-roll at 0 seconds and repeat every 60 seconds. -
-1,60
: Post-roll at the end and repeat every 60 seconds. -
60,0
: Repeat every 60 seconds and include a pre-roll. -
60,-1
: Repeat every 60 seconds and include a post-roll.
-
-
Invalid combinations: Custom intervals like
10,60
are not allowed.
- Valid formats specify pre-roll or post-roll combined with an interval:
-
Three Values:
- Valid combinations include one positive interval with pre-roll and/or post-roll:
-
0,60,-1
: Pre-roll at 0 seconds, repeat every 60 seconds, and post-roll at the end. -
60,0,-1
: Repeat every 60 seconds, with both pre-roll and post-roll.
-
-
Invalid combinations: Custom intervals like
10,60,130
are not allowed.
- Valid combinations include one positive interval with pre-roll and/or post-roll:
-
Single Value:
-
0
: Pre-roll at the start of the video or live stream. -
-1
: Post-roll at the end of the video or live stream. - Any positive number: Specifies the interval at which ads will repeat.
-
Input:
60
Ads will repeat every 60 seconds (e.g., 60, 120, 180...). Works for both live streams and VOD. -
Input:
0,60
Ads will play at 0 seconds (pre-roll) and repeat every 60 seconds thereafter. Applies to both live and VOD content. -
Input:
0,60,-1
Ads will play at 0 seconds (pre-roll), repeat every 60 seconds, and include a post-roll at the end. Suitable for VOD and live streams.
-
Parameter:
usersCanSetTheirOwnVideoAdsVASTURL
- Description: Allows users to provide their own VAST URLs for video ads.
- How to Use: Users can set their VAST URL in the "My Account" page.
-
Parameter:
doNotShowAdsForPaidUsers
- Description: Prevents ads from being shown to paid users.
- How to Use: Works with plugins like:
-
Parameters:
optionalAdTagUrl1
,optionalAdTagUrl2
, ...,optionalAdTagUrl10
- Description: These advanced parameters allow different VAST tags for different apps.
-
Use Case: Only useful for building custom apps with specific ad configurations.
- Note: These tags are not typically used for the website.
The placeholders in your ad URLs are dynamically replaced with real values. Here’s a table of all placeholders and how they are updated:
Category | Placeholder | Updated By | Description |
---|---|---|---|
General Information | {ip} |
Server | Viewer’s IP address. |
{content_page_url} |
Server | Content page URL (encoded). | |
Video Information | {video_duration} |
Video Metadata | Length of the video. |
[VIDEO-TITLE-HERE] |
Video Metadata | Clean video title. | |
{Category} |
Video Metadata | URL-encoded video category. | |
{ChannelName} |
Video Metadata | URL-encoded video channel. | |
Ad Tracking | {cb} |
Server | Cache buster value. |
[ADS-TRACKING-ID] |
Server | Another cache buster. | |
{{CACHEBUSTER}} |
Server | Similar to {cb} . |
|
User Information | {device_id} |
Device/Session | Viewer’s device ID. |
[DEVICE-USER-AGENT] |
Request Headers | URL-encoded user agent. | |
{os} |
Device Metadata | Operating system. | |
{Country} |
Geolocation | Viewer’s country (URL-encoded). | |
{lat} |
App Request (lat parameter) |
Latitude sent by the app. | |
{lon} |
App Request (lon parameter) |
Longitude sent by the app. | |
{u_paln} |
App Request (u_paln parameter) |
User plan. | |
{ifa} |
App Request (ifa parameter) |
Identifier for advertisers. | |
Screen Information | {width} |
Device Metadata | Screen width. |
[CONTENT-DISPLAY-WIDTH] |
Device Metadata | Alternative for {width} . |
|
{{WIDTH}} |
Device Metadata | Another alternative for {width} . |
|
{height} |
Device Metadata | Screen height. | |
[CONTENT-DISPLAY-HEIGHT] |
Device Metadata | Alternative for {height} . |
|
{{HEIGHT}} |
Device Metadata | Another alternative for {height} . |
|
Additional Tracking | [LIMIT-TRACKING] |
Configuration | Tracking limit (0 or 1). |
Monitor your ads with detailed reports on:
- Impressions
- Click-through rates
- Skipped ads
Refer to the Ad Performance Report Tutorial.
If you're not seeing ads, the most common issues are:
- Sometimes, the ad tag you are using may not be providing ads, making it unclear whether the plugin is set up correctly or if the issue is with the ad provider.
-
Use a Reliable Test Tag:
To confirm your setup is working, use the following test ad tag:https://vast.forjesus.tv/vast.xml
This tag will always deliver ads, allowing you to verify that everything is configured correctly.
- If ads appear with this test tag, the plugin is working as expected.
- If ads still don’t appear, the issue is likely with your plugin configuration.
-
Check Your Ad Provider:
- If the test tag works but your own ad tag doesn’t deliver ads:
- Contact your ad provider.
- Ask them to check why their tag isn’t delivering ads.
- If the test tag works but your own ad tag doesn’t deliver ads:
- If you are using the PayPerView or Subscription plugins, they may block ads for users who are subscribed to one of your plans or have purchased content.
-
Temporarily disable the PayPerView and Subscription plugins.
-
Check if ads appear after disabling these plugins.
- If ads start working, the issue is related to one of these plugins.
- Review the settings in these plugins to ensure they are not blocking ads for your account.
You can add multiple ad tags to ensure ads are always delivered. The plugin will try each tag in order until one works.
Example:
https://vast.forjesus.tv/vast.xml;https://company1.vast.xml;https://company2.vast.xml
In this case:
- The first tag (
https://vast.forjesus.tv/vast.xml
) ensures ads are delivered if other tags fail.
-
Test with the reliable tag:
Usehttps://vast.forjesus.tv/vast.xml
to ensure the plugin is working. -
Check other plugins:
Temporarily disable the PayPerView or Subscription plugins to confirm they’re not blocking ads. -
Contact your ad provider:
If the test tag works but your own tag doesn’t, reach out to the provider to resolve the issue.