Install the Messenger on your site
The Messenger is the chat button your customers see on your site or in your app.
Add the code
Go to Messenger and copy the install snippet under Install. Paste it before the closing </body> tag on every page:
<script src="https://cdn.mossbird.io/m.js" data-workspace="your-workspace" async></script>
Your snippet already has your workspace filled in. A few seconds after the first page load, the Messenger page shows the site it was seen on.
Choose where it can run
Under Branding & where it runs → Allowed domains, add the domains you install it on. A domain also covers its subdomains. Leave the list empty to allow any site.
Tell Mossbird who's signed in
If your customers sign in to your app, call identify after sign-in so their conversations arrive with their name, email and company:
Mossbird('identify', { userId: 'u_123', email: 'jun@example.com', name: 'Jun Park' });
Then turn on identity verification in Settings → App connection and send a userHash your server computes, so nobody can pretend to be one of your customers. The exact code for your workspace is on that page.
Cookies
The Messenger doesn't set cookies. It keeps a visitor token in the browser's local storage so a visitor's conversations are still there next time. Call Mossbird('shutdown') when someone signs out to clear it.
