Media.net

This is a sample page to test the lazy loading of the media.net.

Media.net’s latest code should support Lazy Loading but the Media.net Ad just disappears when the lazy loading is enabled on the Ad Inserter pro plugin. I’m using the latest code.

The Ad codes I have used

Ad Code 1

<script id="mNCC" language="javascript">
medianet_width = "300";
medianet_height = "600";
medianet_crid = "755730252";
medianet_versionId = "3111299";
</script>
<script src="//contextual.media.net/nmedianet.js?cid=8CUTQRML8"></script>

Ad Code 2

<script id="mNCC" language="javascript">
medianet_width = "600";
medianet_height = "250";
medianet_crid = "987412406";
medianet_versionId = "3111299";
</script>
<script src="//contextual.media.net/nmedianet.js?cid=8CUTQRML8"></script>

Reason

The code doesn’t support asynchronous loading.
Browser reports the following:

Failed to execute ‘write’ on ‘Document’: It isn’t possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened.
https://contextual.media.net/nmedianet.js?cid=8CUTQRML8

If you check the code you’ll see many writes there. The code uses document.write. So, it
can’t be used asynchronously.

Below I have added both media.net ad units as lazy loading.