heytappr.book a demo

install guide

heytappr + ruby on rails

add heytappr to a rails app with one script tag in the application layout.

where it goes

add the script to app/views/layouts/application.html.erb, just before the closing body tag, so every view rendered with that layout includes it.

app/views/layouts/application.html.erberb
<!DOCTYPE html>
<html>
  <head>
    <title>MyApp</title>
    <%= csrf_meta_tags %>
    <%= stylesheet_link_tag "application" %>
    <%= javascript_importmap_tags %>
  </head>
  <body>
    <%= yield %>
    <script src="https://cdn.tappr.app/embed.js" data-tapprid="your-business"></script>
  </body>
</html>

things worth knowing

  • if you use a content security policy initializer, allow https://cdn.tappr.app as a script source.

  • with turbo, the body gets swapped on navigation. test that the assistant stays available after a few page visits.

  • allowlist your web origin in the heytappr workspace, or the embed won't load. add every origin you serve from, including staging.

questions

is there a gem?

no. the layout tag is the whole install.

what if i have more than one layout?

add the tag to each layout your users see, like an admin layout and a customer layout.

what teams do next

other stacks