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

Verified by YHost yourdomain.co.za

data-theme="dark"

Default variant.

Verified by YHost yourdomain.co.za

data-theme="light"

For white backgrounds.

Verified by YHost yourdomain.co.za

data-size="compact"

Pill format.

Reference

Supported attributes

AttributeValuesDescription
data-yhost-badgeMarks the container. Required.
data-idYour badge IDIssued on approval, e.g. YH-240118-A4F2C. Required.
data-siteDomain textLabel shown on the badge. Defaults to the current hostname.
data-themedark · lightColour scheme. Default dark.
data-sizedefault · compactFull card or pill. Default default.
data-linktrue · falseWhether 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.za under script-src and img-src.