Audience rules
Audience rules decide where the widget shows up - and, just as importantly, where it doesn’t. They are suppression rules: when one matches, the widget simply doesn’t mount on that page view. Rules are evaluated in the shopper’s browser when the widget script runs, and re-checked on route changes in single-page storefronts.
Available rules
| Rule | What it does |
|---|---|
hideOnPaths | Hide on URL paths matching any pattern in the list (up to 20). A plain string matches as a substring; wrap a pattern in /…/ to match it as a regex. |
hideOnCartCheckout | Hide on cart and checkout pages so the widget doesn’t compete with the payment form. |
hideOnMobile | Hide on viewports narrower than 640px - for merchants who only want the widget on desktop and tablet. |
loggedInOnly | Show only to logged-in shoppers (requires the platform bridge to report login state). |
vipOnly | Show only to shoppers whose lifecycle stage is VIP. |
Setting rules
The legacy /widget.js embed reads window.salespilotAiWidget before it runs. The generated per-store loader is a different path and does not read this browser object. Do not paste this override beside a generated loader and assume it changes launcher visibility. For the legacy path, place the configuration before the script:
window.salespilotAiWidget = {
storeId: "YOUR_STORE_ID",
widgetKey: "YOUR_WIDGET_KEY",
audienceRules: {
hideOnCartCheckout: true,
hideOnMobile: false,
// Substring match, or /regex/ when wrapped in slashes
hideOnPaths: ["/pages/privacy", "/pages/terms", "/\\/legal\\//"],
},
};
// Load https://app.zubbyai.com/widget.js after this configuration.
// Use one embed path per page; do not also load the per-store facade.A quick example - hide the widget on checkout and legal pages:
- Open the page where your embed snippet lives (theme footer, custom code section - see Embed codes).
- Add
audienceRulesto the config object as above, withhideOnCartCheckout: trueand your legal paths inhideOnPaths. Suppressing the widget at checkout keeps it from distracting shoppers mid-payment; legal pages are where the AI shouldn’t be a salesperson. - Publish, then load a product page (widget shows) and the cart page (widget doesn’t) to confirm.
Platform-level toggles
- WooCommerce - the plugin settings include “hide on checkout” (on by default) and “hide on cart” toggles; no code needed.
- Shopify - the theme App Embed has an enable checkbox per theme, and you control placement via the theme editor.
- Popup mode - the proactive popup has its own display scope (product pages only, cart only, both, or everywhere) plus a trigger (time on page, exit intent, cart idle) and a dismissal cooldown, configured in
Dashboard → Widget Designer → Behavior.
Targeting the look, not the visibility
Separate from suppression, the Widget Designer can vary the widget’s appearance by context: per-page-type theme skins (e.g. a different preset on cart pages), scheduled seasonal themes, and an A/B theme variant split. Those change styling - they never hide the widget.
Audience rules vs. journey rules
Client-side by design
Verify both sides of a rule
Test an allowed product path and an excluded checkout path, then navigate between them without a full reload on a single-page storefront. Test guest and signed-in users separately for login rules; a typed email is not a verified login. VIP rules require the host to provide the expected lifecycle state. Test at 639px and 640px for the mobile threshold. Confirm a malformed regex does not accidentally hide the experience you intended to show.