XACUBE
DocumentationLive chat for…Privacy and security
Start free
Getting startedInstall guidesPlugin releasesUsing the inboxLive visitorsImages and drawingCustomising the chat windowWordPress plugin and inboxInbox in your own admin panelYour team and rolesRecognising signed-in customersPlans and how long chats are keptPrivacy and security

Install the live chat widget on Ruby on Rails

XACUBE puts a live chat widget on your Ruby on Rails site, so your live agents can answer visitors the moment they ask, from one shared inbox. The free plan covers one agent.

Why XACUBE live chat on Ruby on Rails

  1. Open app/views/layouts/application.html.erb and paste the code just before </body>.
  2. Publish your site. The chat appears on every page.
<script src="https://chat.xacube.chat/w.js" data-key="YOUR_PUBLIC_KEY" async></script>

Replace YOUR_PUBLIC_KEY with your own key. In your panel, open your website and this code is shown with your key already in it.

Recognise signed-in customers

<% hash = OpenSSL::HMAC.hexdigest('SHA256', ENV.fetch('XACUBE_SECRET_KEY'), current_user.id.to_s) %>
<script src="https://chat.xacube.chat/w.js" data-key="YOUR_PUBLIC_KEY"
  data-user-id="<%= current_user.id %>"
  data-user-hash="<%= hash %>"
  data-user-name="<%= current_user.name %>"
  data-user-email="<%= current_user.email %>" async></script>

Related

Live chat for your site

Live chat for Ruby on RailsAdd live chat to a Rails app in your application layout instead of building one with Action Cable. Recognise signed-in users with OpenSSL HMAC. Free plan.Live chat for web agenciesLive chat for web designers and agencies: add it to every client site in minutes, on WordPress or any stack, and give each client a private inbox.Live chat for service businessesLive chat for service companies, from repairs and cleaning to legal and design: answer quote requests while the customer is choosing who to hire.

Other install guides

Node.jsExpressLaravelPHPDjangoFlask