Jibuni's chat box is one line of code. It does not change your website's design, it does not need a plugin, and it does not slow your pages down — the browser loads it after your own content, not before.
Before you start
Two things, in this order. Teach Jibuni something first, or the chat box will have nothing to answer from and will tell every visitor it does not know — see how to teach Jibuni about your business. Then come back here.
You also need somebody at Jibuni to have checked your business. We do that by hand, usually the same day you sign up. Until then the switch to go live stays locked, which is deliberate: anybody can type any business name into a sign-up form, and a chat box speaking for a SACCO that is not theirs would be somebody else's fraud.
Find your line of code
- Open your Jibuni dashboard and go to Chat box.
- Try it yourself in the preview on that page. Ask it the three questions your customers ask most.
- When you are happy with it, switch Live on.
- Copy the line of code. It looks like this, with your own business's code in the middle:
<script src="https://jibuni.co.ke/widget.js" data-jibuni="YOUR-CODE" async></script>
Paste it just before the closing </head> tag, on every page you want the
chat box to appear on. Usually that means pasting it once into your theme's header, which
puts it on the whole site.
WordPress
The simplest way, with no plugin and nothing to break:
- In your WordPress admin, go to Appearance → Theme File Editor.
- Open
header.phpin the list on the right. - Find
</head>and paste the line immediately above it. - Click Update File, then open your website in a new tab.
If your theme updates itself, that edit can be overwritten. To avoid that, either use a child theme, or install a small plugin such as one of the "insert header and footer code" plugins and paste the line into its header box instead. Both are fine; the plugin is easier to undo.
Shopify
- From your Shopify admin, go to Online Store → Themes.
- On your current theme, click ⋯ → Edit code.
- Under Layout, open
theme.liquid. - Find
</head>and paste the line immediately above it. - Click Save.
Wix
- In your Wix dashboard, go to Settings → Custom Code.
- Click Add Custom Code.
- Paste the line into the code box.
- Set Add Code to Pages to All pages, and Place Code in to Head.
- Click Apply.
A website you or a developer built
Paste the line into your HTML template before </head>. That is all it
needs — no build step, no package to install, no framework to configure. It is plain
JavaScript with no dependencies, it lives inside a shadow root so it cannot touch your
own styles and your styles cannot touch it, and it is about 10 KB over the wire.
If your site sends a Content Security Policy header, add https://jibuni.co.ke
to your script-src and connect-src. The chat box is written not
to need unsafe-inline for either styles or scripts.
Pinning a version
/widget.js always serves the current script, so a fix reaches your website
the same day without anybody asking you. That is the right default for almost everybody.
If you would rather your site ran a script you have checked and nothing else — a reasonable position for a bank or a SACCO — every release is also kept at its own permanent address with a hash you can pin:
<script src="https://jibuni.co.ke/widget-<version>.js"
integrity="sha384-..." crossorigin="anonymous"
data-jibuni="YOUR-CODE" async></script>
The browser then refuses to run anything that is not byte for byte the file you pinned, including anything our server might later be made to send. The trade is that you stop getting fixes until you update the snippet yourself. Ask us for the current version and hash, or find them on the Chat box page.
Check it worked
Open your website in a private window — not the tab you were editing in, which may be showing you a cached page. You should see the bubble in the corner within a second or two. If you do not:
- Is it switched on? The chat box does not appear at all until Live is on and your business has been checked.
- Did the paste go in the right place? It must be inside
<head>, or just before</body>. Pasted into a page's visible text, it will show up as text. - Is your site caching? Clear your site's cache if you use a caching plugin or a CDN.
- Have you limited the domains? If you listed allowed domains on the
Chat box page, the box only loads on those. Check the spelling, and remember that
example.co.keandwww.example.co.keare different.
Still nothing? Send us the address of your website and we will look at it with you.