In 2020 Google introduced various measures for regulating online advertising in the Google Chrome browser. The Heavy Ad Intervention feature was released in order to identify and unload online ads that are deemed as 'heavy'.
When the player isn't integrated and initialized directly as advised in our Player documentation and also by Google, Chrome may label our player iFrame as an 'ad' and unload the player due to the Heavy Ad mechanism.
In this article, you'll learn what is Heavy Ad and why does it impact our player. You'll also learn to identify if your integration is impacted by Heavy Ad, and how to solve this issue.
What is the Heavy Ad?
Simply it is a mechanism to detect, unload and remove video ads that consume large amounts of system resources such as network bandwidth and CPU processing power.
Poorly performant ads harm the user’s browsing experience by making pages slow, draining device battery, and consuming mobile data.
According to Google, an ad is considered 'heavy' if it meets any of the following criteria:
- It used the main thread for more than 60 seconds total
- It used the main thread for more than 15 sec in any 30 sec window
- It used more than 4 MBs of network bandwidth to load resources
Heavy Ad & User interaction
Heavy Ad won't be triggered on content that has received a user interaction. It means that video player with the autostart settings set to off won't be impacted as the user is starting the player manually.
Why is the Player being affected by Heavy Ad
It should only affect and unload ads within the Dailymotion player if they hit any of the above criteria, therefore it shouldn't interfere with the content viewing experience offered by the player solution.
However, due to the integration of the Player or the Player library, the loaded player iFrame could be labelled, and seen as an 'ad' by Chrome and consequently resulting in it being impacted by this mechanism.
Due to the following type of installations, an online video player could be viewed solely as an 'ad' by chrome and therefore susceptible to intervention and unloading:
Implementation method | Description |
---|---|
Integrating the Player or library using a third-party solution | Third-party advertising solutions such as Google Ads Manager or tools to manage the loading of various scripts which maybe include player integration |
Integrating the Player or library using a JavaScript file that has been flagged against one of the rules in the Chrome ads detection list (also called EasyList) |
The list can be seen here, Chrome matches script URLs against the list, therefore if the script loading the player assets matches one of the rules it will be considered an ad. |
Integrating the Player or library using another script that also loads other advertising elements along with the Player. | If the script that is loading the player or player library, is also loading other elements which are flagged as an ad. |
So any requests and injection of DOM elements such as iframes made on behalf of previously tagged scripts will also be tagged as an 'ad'.
The advice per our team and Google is to add and load Player assets directly and in isolation of other elements which could be deemed as an 'ad' and ensure the player itself is not a victim of these strict policies.
How can I check if my integration is mistakenly targeted as an 'ad'?
With regards to the next paragraph, we define an 'ad' script as a script which URLs have been flagged against one of the filter lists rules OR and a script which loads player assets along with other elements which have been deemed as advertising elements.
In order to check if your integration can be impacted by the Heavy Ad rules, you will have to identify if your player is being initialized via an ad script.
In this troubleshooting guide, you'll learn how to activate and filter information with your Developer console, check the scripts loading the player, and inspect the different scripts when it's required.
Please remember that you'll need to :
- Use Chrome
- Disable all adblocker extension
- Get a web page on your properties using the Dailymotion player
Set up your developer console
First of all, you'll have to set-up the Chrome built-in developer console and filter it to easily start your troubleshooting :
- Open a new tab on your Chrome browser
- Open the Developer tools, either with right click and Inspect button either with F12
- Click on the Network tab,
- Filter the network elements by clicking on the Doc tab, and type dailymotion.com on the search
Inspect the player loading
Now that your developer console is ready, you'll have to check the scripts executed to load the player on your properties with the following steps:
- Go to your website and open a page with the Dailymotion player embedded
- When your page will be loaded, your developer console should display a result, click on it
- On the new panel opened, click on the Initiator tab
This tab will list all the scripts that have been executed to load the player, in an anti-chronological order. We invite you to check any unknown scripts with your technical team by using the methods described on the next chapter.
Analyze the scripts
If you've identified an unknown script, you will be able to get additional details by using the Sources tab with the following steps:
- Click on Source, select the ... menu and click on Open file
- A new modal will open, where you will be able to search for the unknown scripts
- The search bar will auto-fill your search query, and you will be able to find the script provider
- By clicking on the file title, you will be able to navigate within the script and analyze its purpose.
If it's ads-related, it means that this script may have been identified by Chrome and targeted as an ad.
Please note that you can contact your Content Manager or the Support team if you have a specific integration, or if you need additional help to investigate this issue.
Client-side tracking with the Player API
It's possible to track when heavy ad player intervention occurs using the Player API. The event 'PLAYER_HEAVYADSINTERVENTION' is exposed via the Player API which can be picked up easily using our latest integration methods for the web.
After catching this event you can then track it using your dedicated analytics solution or maybe introduce other behavior to help remedy the intervention as a fallback.
Check out the code below or view a live sample in our offical developer codepen account here.
dailymotion
.createPlayer('myPlayer', {
video: 'x6feo7b',
})
.then((player) => {
player.on(window.dailymotion.events.PLAYER_HEAVYADSINTERVENTION, ({
playerHeavyAdsInterventionReports
}) => {
console.log('PLAYER_HEAVYADSINTERVENTION', playerHeavyAdsInterventionReports)
})
})
.catch((e) => console.error(e))