Anchor Ad Format

The anchor unit attaches to the bottom or top of the screen and scrolls with the user for ads with maximum viewability.


View on GitHub

How to implement the anchor ad format

See the following snippets for example implementations of the anchor. The emulator to the right shows the typical implementation on a phone.

Mobile Bottom Anchor
<script type="text/javascript">
    window['nitroAds'].createAd('sample-anchor-1', {
        format: 'anchor',
        refreshLimit: 10,
        refreshTime: 90,
        sizes: [[320, 50]],
        report: {
            enabled: true
        },
        mediaQuery: '(max-width: 767px)'
    });
</script>
Desktop Bottom Leaderboard
<script type="text/javascript">
    window['nitroAds'].createAd('sample-anchor-2', {
        format: 'anchor',
        refreshLimit: 10,
        refreshTime: 90,
        sizes: [[728, 90]],
        report: {
            enabled: true
        },
        mediaQuery: '(min-width: 768px)'
    });
</script>

Disable your ad-blocker on this site

You'll be unable to view or interact with any any of the samples while you're running an ad or script blocking extension.

You can either whitelist this domain (recommended), or pause the adblocker for this session. Consult the extension's documentation for more details. Refresh this page to try again.