Installation
Install the Promptify messenger by adding the embed script to your website.
Embed script
Section titled “Embed script”Copy the embed snippet from Settings > Messenger > Install and add it before the closing </body> tag on every page where you want the messenger to appear.
The snippet loads the widget asynchronously and sets up a window.promptify object you can use to identify users.
Identifying users
Section titled “Identifying users”After the script loads, identify the current user:
// For logged-in userspromptify.setUser({ id: "user-123", email: "jane@example.com", name: "Jane Doe",});
// OR for anonymous visitorspromptify.setUser({ id: null });Calls to promptify.setUser() made before the script finishes loading are queued and processed automatically.
Single-page applications
Section titled “Single-page applications”The widget listens for Turbo and Turbolinks navigation events automatically. For other SPA frameworks, no additional setup is needed. The widget persists across client-side navigations.
Verifying installation
Section titled “Verifying installation”Once installed, visit your site and look for the chat launcher in the corner of the page. Click it to open the messenger and send a test message.