iAdvizeDocs

Quickstart

Create a site, set up an agent, and put the assistant on a test page in a few minutes.

This guide takes you from nothing to a working assistant on a test page, using the real embed mechanism: no launcher, no separate script host, just a snippet and a trigger you wire yourself.

Prerequisites

  • A signed-in iAdvize organization. If you just signed up, onboarding already created your organization, your site, and an agent, and already made that agent the site's default, so jump straight to installing the tag.
  • A storefront (or a local test page) you can add a <script> tag to.

The three steps below are what you'd do to set a site up by hand: creating a second storefront, or an extra agent alongside the one onboarding made.

Create a site

Open the site switcher at the top of the sidebar and choose Create site (or go to /dashboard/sites/new). Enter the storefront's public address and continue. The site, its name, its language, an agent, and a catalog connection where we can confirm one are all derived from it, exactly as in first-run setup.

That means the next two steps are usually already done for you. Read on if you want a second agent on the site anyway.

See Sites for the full model.

Create an agent

Inside the new site's workspace, open Agents → New agent. Give it a name and pick a type: Shopping assistant for the built-in persona, or Custom if you're writing your own instructions from scratch. Save.

The agent lands with a v1 champion that has empty instructions. It's already usable, so there's nothing to publish before the next step.

See Agents for the full model.

Make it the site's default public agent

Go to the site's Settings → Public access and pick your new agent from the Default public agent select. Only agents with a published (champion) version show up here, and the one you just created already qualifies. (A site created from a storefront address already has its onboarding agent set here; you only need this step to point it at a different one.)

You don't need to turn on Enable public access for this. That toggle only controls the separate hosted share link (Public link). The web tag you're about to install works from the site's key alone.

Install the tag

On the same Public access page, the Install the tag on your site card holds a snippet already filled in with this site's public key. Copy it and paste it once into your storefront, ideally just before </body>:

<script>
  ;(function (w, d) {
    w.iadvize =
      w.iadvize ||
      function () {
        ;(w.iadvize.q = w.iadvize.q || []).push(arguments)
      }
    w.iadvize.k = 'pk_site_YOUR_PUBLIC_KEY'
    function l() {
      var s = d.createElement('script')
      s.async = true
      s.src = 'https://tag.iadvize.ninja/tag/loader.js'
      d.head.appendChild(s)
    }
    if (d.readyState === 'complete') l()
    else w.addEventListener('load', l)
  })(window, document)
</script>

Copy the dashboard snippet, not this one

The block above shows the shape of the snippet. Copy the real one from the Install the tag card: it carries your site's actual public key (pk_site_…), a public, non-secret identifier.

Wire a trigger

This version has no built-in launcher: nothing appears on the page on its own. You decide what opens the panel, either way:

<button data-iadvize-open>Ask our assistant</button>
iadvize('open')

Verify

Open the storefront, click your trigger, and ask a product question. Confirm you get a relevant answer.

Panel blank or stuck?

Two common causes: the page's origin isn't on this site's Allowed origins list (your site's own URL is added automatically, but a local/staging origin isn't; see Allow the origins that will embed it), or your storefront's Content-Security-Policy blocks the tag host.

Next steps

  • Embedding the assistant: panel side, backdrop, closing behavior, CSP, and testing from a local page.
  • Public link: share a working assistant at a standalone URL, no storefront changes needed.
  • Authentication: create an API key; every endpoint under /api/v1/ requires one, sent as a bearer credential.

On this page