Anchor Ads

By default, standalone will show Ezoic anchor ads if enabled in dashboard under the Ezoic Ads tab.

Turning Off Anchor Ads

To turn the anchor ad off for a specific page, the ezstandalone.setEzoicAnchorAd function can be used.

In order for this functionality to work, it must be called prior to ezstandalone.enable().
 1<script >
 2    window.ezstandalone = window.ezstandalone || {};
 3    ezstandalone.cmd = ezstandalone.cmd || [];
 4    ezstandalone.cmd.push(function() {
 5        ezstandalone.setEzoicAnchorAd(false);
 6        ezstandalone.define(101, 102, 103);
 7        ezstandalone.enable();
 8        ezstandalone.display();
 9    });
10</script>

Checking If Anchor Ad Was Closed

To see if the Anchor Ad has been closed for a user's session, use the hasAnchorAdBeenClosed function

Below is an example of using the function to determine whether to keep showing the anchor ad

 1<script >
 2    window.ezstandalone = window.ezstandalone || {};
 3    ezstandalone.cmd = ezstandalone.cmd || [];
 4    ezstandalone.cmd.push(function() {
 5        let anchorHasBeenClosed = ezstandalone.hasAnchorAdBeenClosed();
 6        ezstandalone.setEzoicAnchorAd(anchorHasBeenClosed);
 7        ezstandalone.define(101, 102, 103);
 8        ezstandalone.enable();
 9        ezstandalone.display();
10    });
11</script>