B Blengi docs

Embed the widget

Preview the agent on your site

A site preview is a link that shows one of your pages with the agent already on it, served from Blengi. Nothing has to be installed on the site for it to work: the page is fetched, your stylesheets and images keep loading from your own host, and the widget is added at the end. Open the link and the agent is there.

It exists for the moment before the real install is in place — a demo tomorrow while a tag-manager change is still with an agency, a stakeholder who wants to see the agent on the actual page rather than in a playground, a sanity check of how the widget sits in a theme. It is not a way to run the agent for visitors: the proper install is the snippet, and a preview link expires.

Mint a link

php artisan pitchbar:site-preview-link <agent-id> https://www.example.com/pricing/ --days=3

The command prints a signed URL. Links last three days by default and fourteen at most. Same-site links inside the page are re-signed with the same deadline, so whoever opens the preview can click through the site with the agent present the whole time; links to other sites are untouched.

What it can and cannot show

  • The page's host must be one of the agent's allowed origins. A preview can only ever show a site the agent is already allowed on, never someone else's.
  • Conversations opened through a preview are playground conversations: they show up nowhere in analytics, content gaps, leads or usage. The agent answers exactly as it would on the live site, and page questions, segments and restricted paths follow the real page URL, not the preview's.
  • The page is fetched as a visitor would see it, without being logged in, and cached for five minutes. The page's own JavaScript does not run in a preview — not its tag manager, not its analytics, not its embeds — because the preview is served from this app's domain and nothing from another site may run there. Menus, sliders and forms that depend on it render as the stylesheet leaves them, which for a content page is close to identical; forms will not submit.
  • Private, internal and unresolvable addresses are refused, and the copy carries noindex, so it never reaches search engines.

How the widget boots without touching allowed origins

The preview is served from this app's domain, which is not on your allowed-origins list, and it should not be. Instead the widget is given a short-lived preview token for that one agent, the same mechanism the dashboard's own Preview uses. It waives the origin check for a few minutes from each open and nothing else, and it is what marks the conversation as playground.