In this example, I load three blocks of Google Ads, an Amazon Widget and the Google Analytics script in a static way, using regular script tags.
This demonstration was set up by Eric Bréchemier, Freelance Software Designer. It results from extensive research on browsers behaviors with regards to script loading, with one goal in mind: being able to defer the loading of legacy third party scripts still using the ill-famed document.write method.
Since any call to the document.write method after page load will reset the document to a blank page, it had to be replaced with a convincing equivalent. This is the role played by bezen.domwrite, a module part of the bezen.org Javascript library, which simulates document.write and safeguards the document.
In this page, bezen.domwrite is not used, and scripts are loaded in a static way. Check how the same scripts can be loaded dynamically by relying on bezen.domwrite in combination with a script loader:
The Google Analytics script: is not loaded yet