What this demonstrates

Here sa.min.js is loaded without async, so it initializes before the body parses. Each snippet executes its queued function immediately, and the resolver anchors on document.currentScript — the most precise anchor there is.
Integration used on this page
<!-- Head: consent + BLOCKING loader (no async) -->
<script data-cfasync="false" src="https://cmp.gatekeeperconsent.com/min.js"></script>
<script data-cfasync="false" src="https://the.gatekeeperconsent.com/cmp.min.js"></script>
<script src="https://www.ezojs.com/ezoic/sa.min.js"></script>
<script>
  window.ezstandalone = window.ezstandalone || {};
  ezstandalone.cmd = ezstandalone.cmd || [];
</script>

<!-- Body: runs immediately, anchors on document.currentScript -->
<script>
  ezstandalone.cmd.push(function () {
    ezstandalone.showAds({sizes: "300x250"});
  });
</script>

View source on GitHub →

Docs: Ad Placements — Simple Setup (No Placement IDs)

Synchronous loader — currentScript path

sa.min.js is loaded without async on this page, so it initializes before the body parses. Each snippet below executes its queued function immediately, and the resolver anchors on document.currentScript — the most precise anchor there is.

Second paragraph, after the first ad spot. A second snippet follows this paragraph to prove successive sync calls each anchor on their own script.

Third paragraph closing out the article after the second ad spot.