Placing ads
Ads on a website: ad.js
ad.js is small (under 10 KB gzipped), picks the ad format from the server and finds spots added later on its own.
1. Add and verify your site
Add the site as a property in the dashboard and verify it with ads.txt or the meta tag.
2. Place the code
<!-- once per page, inside <head> or before </body> -->
<script async src="https://cdn.halaladz.com/ad.js"></script>
<!-- where an ad should appear: your placement key from the dashboard -->
<ins data-hz-slot="pk_live_xxxxxxxx"></ins>Find the placement key in Dashboard → Placements & ad code. The script is needed once per page; put one <ins data-hz-slot> at each ad spot.
3. Publish and check
Once the property is approved, the ad shows within a few seconds. Verified views appear in Reports. To see it before approval, turn on "Test ads".
Auto ads
One tag, nothing else: which formats, how many and which pages to skip are all set in the dashboard (Placements & ad code → Auto ads).
<script async src="https://cdn.halaladz.com/ad.js"
data-hz-auto="on"
data-hz-auto-key="ps_live_your_site_key"></script>Useful options
| Option | What it does |
|---|---|
data-hz-sticky="bottom" | A small sticky strip at the bottom, closable with one tap; never taller than 30% of the screen |
data-hz-collapse | Hides the spot when there is no ad |
data-hz-consent="off" | Never show our built-in consent message (you have your own) |
<template> | Your own layout for native ads |
Full-screen ads only show between pages — never on top of the page being read — and the close button works at once.