lazy loading iframe causes nesting of notag script

[ad_1]

Hello Support Team.

We came across an issue while doing some content optimisation / modification with an external tool that was unable to process the pages content.

We eventually identified the issues that caused it, which was a double nesting of an iframe within a noscript tag used by googles tag manager.

The original source looks like this:

<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=THE_TAG"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

However, if we enable lazy loading of iframes, it looks like this:

<!-- Google Tag Manager (noscript) -->
<noscript><iframe data-lazyloaded="1" src="https://projectdmc.org/support/topic/lazy-loading-iframe-causes-nesting-of-notag-script/about:blank" data-src="https://www.googletagmanager.com/ns.html?id=THE_TAG"
height="0" width="0" style="display:none;visibility:hidden"></iframe><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WKW7VMF"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript></noscript>
<!-- End Google Tag Manager (noscript) -->

Is there a way to prevent the iframe in this noscript tag from being double nested or somehow exclude it from the optimisation process?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer