Installing on custom HTML sites
Add the Yokaify mascot to any hand-built or server-rendered site with one script tag.
The snippet
<script src="https://cdn.yokaify.com/widget.js" data-site-key="YOUR_SITE_KEY" async></script>
Get your real snippet (site key pre-filled) from the Yokaify dashboard under Settings → Sites.
Where to put it
- Shared template: if your pages extend a base template (PHP include, Django/Jinja base, Rails layout, static-site partial), add it there once, just before
</body>. - No template system: add it to each page you want covered. The mascot only helps on pages where the script loads.
Attributes
| Attribute | Required | Purpose |
|---|---|---|
data-site-key | Yes | Your site's public key from the dashboard. |
data-api-base | No | Override the API endpoint. You normally never need this. |
data-yk-* | No | Optional identity/context attributes — see the widget attributes reference. |
Rules of thumb
- Once per page. Two copies of the script will try to mount two mascots.
- Keep
async. It's how the script stays off your critical rendering path. - Serve over HTTPS. Mixed-content rules will block the widget on HTTP pages embedded in HTTPS contexts.
Verify it worked
Load any page with the snippet in a private window — the mascot appears within a couple of seconds. The dashboard's Setup page confirms the install automatically. Full checklist: Verify your installation.