Partner reference
Add the ad to your site.
Paste a few lines of HTML where the ad should appear. Replace YOUR_SPOT_ID with your spot's number, and the width and height with your spot's size. Your exact code is in Ad Manager, next to each spot.
What the code does
- It shows the ad running in your spot: a plain image, with the advertiser's link when the spot's ads have one. It runs no script and sets no cookie.
- When several ads share the spot, each load shows one of them, chosen by the spot's rotation.
- When no ad is running, the image form shows a transparent image (empty space), and the iframe form shows nothing.
Plain HTML
Image and link spots: the iframe
Use this for any spot whose ads link somewhere. The iframe holds the image inside the advertiser's link, and the link opens in a new tab.
<iframe src="https://liberads.net/render_ad_spot.php?spot_id=YOUR_SPOT_ID&type=html"
width="300" height="250" loading="lazy" title="Advertisement"
style="border:0;overflow:hidden;"></iframe> Image-only spots: the image
Use this only for a spot set to image only. It is the bare image with no link: the image address cannot carry the advertiser's link, so for linked ads use the iframe above.
<img src="https://liberads.net/render_ad_spot.php?spot_id=YOUR_SPOT_ID&type=image"
width="300" height="250" alt="Advertisement" loading="lazy"> Hugo
Save this as layouts/shortcodes/liberads.html (or as a partial). It is the same HTML; the visitor's browser loads the ad, so nothing is fetched when the site builds.
<iframe src="https://liberads.net/render_ad_spot.php?spot_id={{ .Get `spot` }}&type=html"
width="300" height="250" loading="lazy" title="Advertisement"
style="border:0;overflow:hidden;"></iframe> Then put it in a page:
{{< liberads spot="YOUR_SPOT_ID" >}} WordPress
Add a Custom HTML block to a post or page, or a Custom HTML widget to a sidebar or footer, and paste the plain HTML above into it.
Flarum
In the admin panel, open Appearance, then Custom Header (or another custom HTML area your theme offers), and paste the plain HTML above.
Not a partner yet?
See what selling ad space on your site involves, and the fees.