Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

Visibility monitoring

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I don't use any ad blockers, and though the SWF days were long ago, I don't remember not seeing the beginning of animated SWFs back then. Now I feel like I never see much more than the last few seconds oh HTML5 ads.


One possibility is placement. In article page banners that appear as you are reading, definitely appear to have been playing before they come into view. Of my own ads i have stumbled upon in the wild, they have all been of this type.


Link to comment
Share on other sites

  • 2 weeks later...

Thanks Frederic,


Unfortunately that is mobile app ads only, and requires using Doubleclick Rich Media with the associated impression costs. I think what has changed the most is ad placement. Because people are following social links rather than going to a site's home page or section fronts, banner ad placements have shifted to in article, and are coming into view as people scroll down to continue reading. I did see a 728 I created play from the beginning, but it was in the legacy masthead position, that from my observations, seems to have been abandoned by most sites.


HTML5 In-page build guide

Make sure that your ad is on screen (mobile app campaigns only)


When an ad first loads in a mobile app, it loads off-screen and out of view. If your ad animates or plays silent video, you should wait until the ad is on-screen to play it. If your ad won't serve in mobile apps, you can skip this step.

This method only works when an ad serves in a mobile app. When the ad serves in a desktop or mobile browser, the VISIBLE event is triggered as soon as the ad is rendered, however the ad may not be in view.
Link to comment
Share on other sites

  • 1 month later...

To detect if your element, video or ad is in the viewport you can take advantage of the HTML5 Intersection Observer API. Better performance then using getBoundClientRect() which causes too much re-layout triggers. But it is not available in IE11 yet, but is for all other modern browsers (chrome, safari, opera, and firefox) including MS Edge.


Using with ads :



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.