New IAB Rule | Initial- and subload

So we hit a brickwall today when uploading our hype banners for the 100 time. It seems here in Germany more rules from the IAB law are being activated.

New Rule is the Subload (page 8). UPDATE: Found a 2017 version PDF.

So what we need to activate is an event listener to watch for the DOM Elements to be loaded and then start the HTML requests (max. 10) for the ad to load.

So I know what has to be done. Only how to do it is the tricky part. Any help would be nice. I received a link to an API with a subloader explanation.

There even is an IAB HTML ad Validator. Still beta, but here one van check their banners.

I’m currently waiting on an account verification email for the validator.

Are you using an Export Script or the “Inline data file+loader” Advanced Export option? If not, the easiest solution would probably be to do something like:


  1. Paste this code into the head of your HTML document:
<script>

var hypeScriptSrc = "REPLACE_WITH_SCRIPT_SRC";

document.addEventListener("DOMContentLoaded", function(event) {
	window.setTimeout(function () {
		var headElement = document.getElementsByTagName('head')[0];
		var scriptElement = document.createElement('script');
		scriptElement.type = 'text/javascript';
		scriptElement.src = hypeScriptSrc;
		headElement.appendChild(scriptElement);
	}, 1000 /* 1 second delay */);

});
</script>
  1. Find the line that looks like:
<script type="text/javascript" charset="utf-8" src="delay.hyperesources/delay_hype_generated_script.js?82237"></script>
  1. Copy the full src argument of this tag and paste it into the REPLACE_WITH_SCRIPT_SRC above.
    (In this case it would be delay.hyperesources/delay_hype_generated_script.js?82237)

  2. Remove or comment out the script tag found in step #2.

This will fully delay the entirety of the ad loading until later.


However, if you’re using an export script, the initial loader and hype runtime will be loaded immediately, and the runtime doesn’t delay in loading external resources. There might need to be changes in the resource loading to support this delay.

1 Like

The activation of the account will take about 6 min. for an email to arrive. Thank you for helping Jonathan.

On your question how am I exporting the files? It is just the simple version: Export a directory of HTML 5 files. Not an advanced export of sorts.

Will give this a try tomorrow, but I guess you will have an updated information, due to the fact you can test it today. Here is in Germany it is late and the child and wife want some dad/husband time.

Thank you once again.

Kind regards,

Dennis van Leeuwen

This does work. What we need to ad is an Initial Load of 50Kb and the rest should follow along a Subload request. See the Generated IAB_ HTML5 Ad Validator.zip (1.0 MB).

If we could also get a method working we can continue using Hype to upload Ads.

Cheers,

Dennis

New info. This is how they would like to see it.

and the files to prove it. :slight_smile: We are trying to build it ourselves atm.
ft_subload_richload.zip (98.8 KB)
subload_base.zip (123.5 KB)

Hi Jonathan,

so, in the end, we worked out a solution using the Adservers API. This is the Final Version, that only work until loaded online on their platform (Live preview).

Here is the added/changed code:
970x250_kiue_turtles_ft_v3.zip (166.3 KB)

It was an interesting day. Trying to code while not knowing how to put the parts together. Feels like swimming on gravel.

Cheers,

Dennis van Leeuwen

Unfortunately those don't seem to load for me, I assume one needs more access/credentials.

I assume you mean "this does not work?" What issues did you run into? I'm a little surprised, but it does appear that the solution you came up with is basically the same thing, just you are using the flashtalking library.

I was able to get an account (they had some verification issues, but manually were able to get me registered). I tested with your zip and found something odd:

The subload k-weight and number of http requests definitely seems off.

I tried my solution on the document. You can download this version here:

970x250_kiue_turtles_ft-2.zip (168.0 KB)

The overview looks a bit more like I'd expect:

I suspect there might be some errors in the ad or in measurement with the flashtalking version you made.

1 Like

Pardon me a Live link here.

Ah, it looks like that link only works on mobile devices and not desktop browsers. I guess the ad does show up so all is good? I do wonder about the weight difference I’m seeing between yours and mine.

What did you use flashtalking for? I was working with their ad builder and what a nightmare that was, never again. Thank g-d for Hype.

Hello Petester,

I am back again. Was on holiday for 1,5 Months. We use Flashtalking for uploading banners so campaign managers can access these banners.

Hi @jonathan, I really like this piece of code. Could we add this with options into the base of Hype for the Banner community? So that with this timeout and politeLoad setting we can bottleneck an initial load to a set value and then after a timeout load the rest fo the banner files/request?

The German Rules of L.E.A.N.:

More Adservers are asking for it and using it. Maybe not Google, but here in Germany there is the OVK (the German IAB, without and https link. Hehe) rule.

I did a visualisation of how I think the options should look like and where to find them inside of Hype.
This is just a suggestion and if the hype community would like to add on this and make it an official feature request, we here would be very happy about it.

preview image:
Tumult%20-%20Hype%20Initial%20Load

I assume you are referring to the code I wrote in the second post of this topic, right?

If this is the only change you need, it could be made today as an Export Script.

To clarify a couple items from your mockup:

  • Is the Initial-Load field the calculated size of the ad, or is it meant to be the max amount Hype would try to load?
  • What other options would you expect to see in the Subload popup? DOMContentLoaded and a "normal" option? Or are there other events?

(As a side note, it has been a long standing request to have better loading control over assets, so I am wondering to myself if the document loading could be a part of that effort too to incorporate this type of feature)

1 Like

Hello Jonathan,

It is about thw codw written in the second post. And here are the two answers to clarify:

  1. The allowed KB before the Website DOM is loaded. for instance a fallback image or the initial html and a few
  2. Yeah, I don’t really know if there are other subload settings or events to be listend to. So that would be the only one in the pulldown menu atm.

Thanks you in advanced.

This is how we manually add the scripts into the Banner HTML.
Look for the Blue, Red and Brighter green comments:

1 Like

Thanks.

This could easily be added with an Export Script to help automate the flow, if you wanted to go that route. The export script examples show how to add code to the start and end of the head and body. If there’s documentation or a spec for your specific requirements I could also help put something together (but it would be unsupported as I can’t make time guarantees to work on it).

1 Like

Hi @jonathan ,
I also work in Germany and have to consider the initial load/subload of iab for a customer.
Unfortunately, we don't work with flashtalking and the API, "only" with the Google Campaign Manager and the JS framework Greensock.
Can you help us to translate the syntax from above to our workflow?

Code_screen.zip (709.6 KB)

Thank you
Kind regards.

Are you uploading it directly to the hub for Flashtalking?
Or do you need a Param code for an IAB Standard clicktag?

Are you working with Hype to build your creatives for Google?

I have two simple script adaptions for exporting hype files to html and then uploading them to IAB or FT AdServers.

No no. I already have a DCM redirect clicktag in it. And I upload the ZIP file to the adserver from Google Campaign Manager. It has nothing to do with flashtaking.
I just need help to load images and the JS animation later (subload).

So doesn't this work, and also inject the CSS file this way.

<!-- ? setTimeout + DOMContentLoaded -->
<script>
        const scriptSrc = "./your_animation.js";
        
        document.addEventListener("DOMContentLoaded", function(event) {
            window.setTimeout(function () {
                const headElement = document.getElementsByTagName('head')[0];
                const scriptElement = document.createElement('script');
                scriptElement.type = 'text/javascript';
                scriptElement.src = scriptSrc;
                headElement.appendChild(scriptElement);
            }, 1000 /* 1 second delay */);
        
        });
    </script>
<!-- ? end setTimeout + DOMContentLoaded -->
1 Like