BidirectionDocs
Open the console

Put your agent on your website

A floating button or your own button, with code for each platform. We confirm it from a real page load.

Agentsyour agentDeployment

Everything about where customers meet your agent lives in one place: open Agents, pick the agent, and choose its Deployment tab. It offers four ways in, and each one shows its own status:

Way inWhat it isIts status shows
Floating buttonThe widget in the corner of your pagesWhen we last saw it load, and on which site
Your own buttonThe same widget, opened by a button you designThe same, once your page loads the code
Help linkA page we host — no install at allHow many times it was opened this week
Mobile appThe help link inside your appWhether the help link is on

This page covers the first two. For the other two, see Share a help link.

The floating button#

  1. Open Deployment and choose Floating button.
  2. Say where it may run. The widget only loads on the domains your workspace lists in Settings · Domains. This step is done as soon as one is on the list — there is nothing to prove. Follow Add a domain (or Or add a new domain) to add yours; it works there as soon as you add it. A domain attached to no agent works for every agent; to keep one for this agent alone, pick it under Make a domain this agent's own…. See Add your domain and Attach domains to agents.
  3. Add the code to your site. Pick your platform: HTML, React, Next.js, Vue, Angular, WordPress, Shopify, Webflow, Wix or Google Tag Manager. Press Copy and paste it where the tab says. Every version carries this agent's own key, so copy it from here.
  4. We confirm it loaded. Load one of your pages. The step turns green by itself, and the card reads Seen on ‹your site›.

For plain HTML the code is one tag, just before </body>:

<script
  async
  src="https://api.bidirection.ai/embed.js"
  data-bidirection-agent="pk_live_…"
  data-bidirection-api="https://api.bidirection.ai">
</script>

Where the floating button shows#

Under Where the floating button shows, pick one:

  • On every page — wherever the code is.
  • Only on certain pages — list addresses under Show on these addresses (one per line; /app/** covers a whole section) and under Never show on, which wins. Type an address under Test an address to see Shows here or Hidden here before you save.
  • Only for signed-in visitors — it shows once your page tells it who is signed in, with bidirection.identify().

Press Save where it shows. It takes effect on the next page load; you do not need to change the code.

Your own button#

Use this when you want the call to start from a button you already have — in your header, on a help page, next to a form — with no floating button at all.

  1. Open Deployment and choose Your own button.
  2. Say where it may run, as above.
  3. Copy the code for HTML, React or Vue. It has three parts:

    • a short snippet for <head>, so your button works even before the

    widget has loaded;

    • the widget tag with data-bidirection-auto="manual", which loads the agent

    without a floating button;

    • your button, which calls bidirection.open().
  4. Press Use my own button. The card then reads In use.
<button type="button" onclick="bidirection.open()">Talk to Nova</button>
<script>
  bidirection.on('call:start', function () { /* e.g. change your button's label */ });
  bidirection.on('call:end', function () { /* … */ });
</script>

When the call ends, nothing is left on the page — the next call starts from your button again.

How we confirm it#

From a real page load. When the widget loads on one of your domains, the step turns green by itself and the card names the site and the time. Installation is never marked done from a checkbox you tick.

There is no separate check of the domain itself. Adding it in Settings · Domains is all the widget needs.

If it says "Not seen yet"#

Load a page of your site that carries the code and give it a few seconds. If it never turns green, check in this order:

  1. The tag is before </body>, not in the head.
  2. The page you loaded is on a domain this agent may run on — step 1 lists them — not a staging host, not localhost. If the site is missing, add it in Settings · Domains, and check it is attached to this agent, or to none.
  3. No script blocker or consent banner is stripping it before it runs.
  4. The page actually shipped — view source on the live URL and look for the tag.

Installing before you launch#

Installing and going live are deliberately separate. A draft agent's code sits silently on your pages — it reports that it loaded and does nothing else. You can install on Monday and launch on Thursday.

Turning it off, and a new key#

At the bottom of the tab:

  • Turn the widget off hides it on every page at once, without touching your code. Turn the widget on brings it back.
  • Make a new key replaces the agent's key. Code already on your pages stops working until you paste the new code, so the console asks you to confirm.

What the code does#

It shows the agent where you said, runs the call, and tells us that it loaded. It does not record page views, clicks, scrolling or what visitors type.

Your own code can drive it through window.bidirection:

CallWhat it does
open() / close()Start or end a call
show() / hide()Show or take down the floating button (hide() also ends a call)
on('call:start', fn) and on('call:end', fn)React to a call starting or ending
identify({ customerId, email })Say who is signed in, for Only for signed-in visitors
suggest({ title })Offer a call at the right moment, for example when your chatbot hands over