Integration
One line of script. A badge your visitors can verify.
The badge is rendered client-side as inline SVG, links back to your public verification page on www.yhost.co.za, and works on any platform that lets you paste HTML.
Step 1
Paste the embed snippet
Place it where the badge should appear — usually the footer, the checkout page, or a contact page.
<div data-yhost-badge
data-id="YH-240118-A4F2C"
data-site="yourdomain.co.za"
data-theme="dark"
data-size="default"></div>
<script src="https://www.yhost.co.za/badge/badge.js" async></script>
Replace data-id with the badge ID from your approval email. The script may be included once even if you place several badge containers on the page.
Step 2
Pick a variant
Reference
Supported attributes
| Attribute | Values | Description |
|---|---|---|
data-yhost-badge | — | Marks the container. Required. |
data-id | Your badge ID | Issued on approval, e.g. YH-240118-A4F2C. Required. |
data-site | Domain text | Label shown on the badge. Defaults to the current hostname. |
data-theme | dark · light | Colour scheme. Default dark. |
data-size | default · compact | Full card or pill. Default default. |
data-link | true · false | Whether the badge links to the verification page. Default true. |
Alternative
No JavaScript? Use the image endpoint
Some platforms block third-party scripts. In that case use the dynamic SVG endpoint inside a normal link.
<a href="https://www.yhost.co.za/verify.php?id=YH-240118-A4F2C"
target="_blank" rel="noopener">
<img src="https://www.yhost.co.za/badge/badge.php?theme=dark&site=yourdomain.co.za"
width="210" height="54" alt="Verified by YHost" loading="lazy">
</a>
Installation notes
WordPress
Add the snippet to a Custom HTML block or your footer widget area.
Shopify / Wix
Use a Custom HTML or embed-code section in the theme footer.
Static sites
Paste directly into your HTML before
</body>.Content security policy
Allow
www.yhost.co.zaunderscript-srcandimg-src.