BridgeDocsOpen Bridge

Install with an AI assistant

Using Cursor, Claude Code, Lovable, Bolt or v0? Copy this prompt, replace pk_YOUR_KEY with your website key, and paste it into your assistant.

prompt
Add the Bridge live chat to this website.

1. Load this script once, on every page (root layout or main HTML template, just before </body>):
   <script src="https://bridgechat.app/widget.js" data-bridge-key="pk_YOUR_KEY" async></script>
   In Next.js, use next/script with strategy="afterInteractive" in the root layout.

2. Whenever we know who the visitor is (after sign-in, after sign-up, or when they submit a form
   that contains their email), tell Bridge:
     window.Bridge = window.Bridge || [];
     window.Bridge.push(["identify", { email, name, company }]);
   Add useful details about the customer as extra keys (plan, signup_date, orders...).
   They become custom attributes in Bridge. Only pass simple values (text, numbers, true/false, dates).

3. When the user signs out, forget the visitor:
     window.Bridge = window.Bridge || [];
     window.Bridge.push(["reset"]);

4. If a bar is stuck to the bottom of the screen on mobile (cart, checkout summary...), lift the chat
   button above it while the bar is visible, and back down when it's gone:
     window.Bridge.push(["setOffset", { bottom: barHeightInPixels }]);
     window.Bridge.push(["setOffset", { bottom: 0 }]);

Reference: https://docs.bridgechat.app/javascript-api
Don't add any other chat widget and don't change anything else.

Your key is in Settings → Websites → your site → Install in Bridge. The prompt does the install, identifies signed-in users and handles sign-out, which is everything most sites need.