R RockAI docs

Run your workspace

Widget on the marketing site

Scope: install-level, not per-workspace
This setting controls the chat widget on the Pitchbar install's own marketing pages (whatever APP_URL serves). It is a platform-level setting โ€” only super_admins of the install can configure it. Customers (workspace members) who want a chat widget on their marketing site embed the standard install snippet (see Install snippet) on their own server โ€” they don't need this toggle at all.

The Pitchbar install's public marketing site (home page + any /marketing/* route) can host a real chat widget pointed at one of the install's published agents โ€” not just the seeded demo sandbox. Configure it under Settings โ†’ Marketing โ†’ Marketing-site widget (super_admin only).

How it works

  1. Toggle Enable widget on marketing pages. While off, the marketing site has no chat surface (default).
  2. Pick an agent from the dropdown. The dropdown lists every published agent in your workspace.
  3. Save. The widget mounts for anonymous visitors only โ€” signed-in admins, customers, and platform admins never see it (would look like surveillance + would pollute your own analytics with internal traffic).

Gate logic

The blade gate in resources/views/app.blade.php resolves the agent in this order:

  1. AppSetting override โ€” when marketing_widget_enabled = true AND marketing_widget_agent_id resolves to a published agent, that agent is mounted with no demo pill.
  2. DEMO env fallback โ€” when the override is OFF but DEMO=true is set in the environment, the seeded MarketingDemoAgent mounts with the data-demo="true" attribute so visitors see a "DEMO" pill.
  3. Nothing โ€” no script tag emitted at all.

CORS

The agent you pick must have your marketing site's origin (the APP_URL) in its allowed_origins. The widget gate doesn't add it for you; if you forget, the widget loads but every API call returns 403 and the bar stays empty.