Integrate with the script

The fastest path: paste one tag, get a working ad with viewability tracking handled for you.

Use this if you control the HTML of the page and can drop in a <script> tag. If you can't (Chrome extensions, native apps, strict CSP), see Integrate with the API (browser) or Integrate with the API (server).

1. Get your placement ID

In the publisher dashboard, create a placement. Pick the format (banner or card) and register the domain you'll show the ad on. Copy the placement ID.

2. Paste the snippet

Drop the snippet into your HTML where the ad should appear.

For a banner ad:

<script src="https://adventory.to/ad.banner.js" data-placement="YOUR_PLACEMENT_ID"></script>

For a card ad:

<script src="https://adventory.to/ad.card.js" data-placement="YOUR_PLACEMENT_ID"></script>

The script creates an iframe that fills its parent, so wrap it in a div sized to your liking. The script handles fetching the ad, rendering it, viewability tracking, and firing the impression pixel for you.

Your page must be served over HTTPS. The script and pixel load from https://adventory.to; serving them on a plain-HTTP page triggers mixed-content blocking in every modern browser.

3. Confirm it's working

Load the page on the registered domain. The first real impression flips your placement from pending to active in the dashboard. See Verification for what to expect, or Troubleshooting if nothing shows up.

Local dev: impressions from localhost, *.test, *.local, and other test origins are silently dropped. Test on the registered domain, or use the API with ?test=1 while developing.

Reference