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
- Toggle Enable widget on marketing pages. While off, the marketing site has no chat surface (default).
- Pick an agent from the dropdown. The dropdown lists every published agent in your workspace.
- 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:
-
AppSetting override โ when
marketing_widget_enabled = trueANDmarketing_widget_agent_idresolves to a published agent, that agent is mounted with no demo pill. -
DEMO env fallback โ when the override is OFF
but
DEMO=trueis set in the environment, the seededMarketingDemoAgentmounts with thedata-demo="true"attribute so visitors see a "DEMO" pill. - 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.