3

We are developing some ads using google web designer tool

so far its good but one main issue with it is, slow loading.

its taking almost 3 seconds to load and we feel very bad about that.

can anyone know how to optimize it?

thanks.

cnu
  • 815
  • 10
  • 22

2 Answers2

6

In developing html5 banners, by default the 'polite load' is checked.

Which means you banner will not be visible and will not load until the page is loaded.

And when testing your banner, there is some moments before showing the banner to simulate the webpage load.

Why?

Because no publisher(Website) allows you to make their website slow. That is the rule. There is no way for you to force yourself to show first on a publisher website.

If you want this option. You should directly talk to the publisher/ when you get approval from them, you can uncheck 'Polite Load' when you are publishing your ad. Then your banner will show faster without any delay.

Majid Kalkatechi
  • 691
  • 7
  • 15
2

@cnu - I have experienced the same issue. The only workaround I have at the moment is to set an initial loading image - while the Ad is loading

Try adding a div with an ID of 'loading' immediately after your opening body tag.

 <div id="loading" class="loading-image">
     <img src="default.png"/>
    </div>

Then find the following function, and set the div to block display

function handleDomContentLoaded(event) {
        // This is a good place to show a loading or branding image while
        // the ad loads.
        document.getElementById('loading').style.display = 'block';
      }

Then find the following function, and set the div to none - to hide the image after loading

function handleAdInitialized(event) {
        // This marks the end of the polite load phase of the Ad. If a
        // loading image was shown to the user, this is a good place to
        // remove it.
        document.getElementById('loading').style.display = 'none';
      }

The official GWD instructions don’t match the functions actually generated in the source, which initially made this setup confusing. The code comments in the source indicate these are the correct functions to use. You can use the first frame of the Ad as the loading image, rather than a loading gif - so the user experience isn't affected too much.

Hope this helps.

Neunieman
  • 36
  • 2