Friday, September 18, 2020

Changes to pause behavior in the Interactive Media Ads (IMA) SDK

Updated (3/16/2021): We have launched the new “pause” behavior on 25% of IMA traffic. This feature will be enabled on 100% of IMA traffic by April 16, 2021. Publishers looking to temporarily disable the new pause behavior may do so using the ImaSdkSettings.setFeatureFlags() API:

adsLoader.getSettings().setFeatureFlags({'disableClickAdPause': true});

This feature flag will be available to publishers to disable the new pause behavior until June 1, 2021 to give publishers more time to make the recommended changes outlined below. After June 1, 2021, this feature flag will no longer function and will become a no-op.

Update (1/14/2021): The new target date for the changes to pause behavior to begin to launch is February 14th, 2021. Initially these changes will only affect a low percentage of requests in order to allow publishers time to make any adjustments without affecting their entire inventory. These changes will ramp up to 100% of IMA impressions on March 2nd, 2021.

Update (11/13/2020): The November 9th launch got rolled back due to the release negatively impacting some publishers. These changes are now being delayed until Q1 2021, with a more specific date to follow. The new date has now been updated in the below text.

Update (10/27/2020): The targeted date for the changes to pause behavior is now set for November 9th, 2020. This has been updated in the below text, instead of the original date of October 13th, 2020.

The IMA SDK is preparing to release changes to pause behavior when user clicks cause navigation away from the page or app. When this happens, the ad will be paused automatically by the SDK. These changes will launch on February 14th, 2021 for a low percentage of IMA requests. By April 16th, 2021 the changes to pause behavior will ramp up to affect 100% of IMA requests.

The IMA client-side SDKs already pause ad playback for ad click-throughs, but these changes add automatic pausing to many other user actions. The IMA DAI SDKs currently do not pause for any click events. For either implementation, if your code does not already provide a way for users to resume ad playback when ads are paused, we recommend adding a way to resume ad playback following ad pause events.

When the SDK automatically pauses the ad, the PAUSED event will be fired. We recommend that publishers listen for this event, and update the UI to allow the viewer to resume the ad. If this UI is not shown, the player may be permanently paused on the ad without a way for the user to resume ad or content playback.

Client-side changes

  • On Desktop web, the SDK will automatically pause when the user clicks on an ad which results in navigation away from the page.
    • This behavior already exists for mobile web and mobile apps.
  • On all platforms, the SDK will attempt to automatically pause if the user clicks on the:
    • Learn more button
    • Ad click (desktop)
    • Non-linear ad
    • Icon click
    • AdChoices icon

Dynamic Ad Insertion (DAI) changes

  • On all platforms for DAI, the SDK will attempt to automatically pause if the user clicks on the:
    • Learn more button
    • Ad click (desktop)
    • Icon click
    • AdChoices icon

Pause events

The table below shows which API is called when a pause event occurs:

IMA platform SDK version Pause event for client-side SDK Pause event for DAI SDK
HTML5 The current evergreen version. google.ima.AdEvent.Type.PAUSED The video player’s pause event.
Android V3.20.0 and later. videoAdPlayer.pauseAd() videoStreamPlayer.pause()
iOS/tvOS All versions kIMAAdEvent_PAUSE kIMAAdEvent_PAUSE

Note: For Android, the onPause event is only available on v3.20.0 and later. For previous versions the IMA SDK will not automatically pause ads, and developers will not have to implement these changes.

Please see the following code snippet as an example of setting up a listener for the PAUSED event for a client-side HTML5 IMA SDK implementation:

adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED, function() {
    showAdResumeUI();
});

function showAdResumeUI() {
  // TODO: Add a play button that resumes playback.
}

Please review your IMA SDK integrations and make any necessary adjustments to handle the pause event so that you’re prepared for when the changes go live on February 14th, 2021. Please look for announcements about pause behavior changes in the IMA HTML5 SDK release notes. If you have questions about making these changes for your own IMA SDK integrations, feel free to reach out to us on the IMA SDK forum.