IntercomRails

Rails helper for creating Intercom (www.intercom.io) javascript tags.

For interacting with the Intercom API, use the intercom gem (github.com/intercom/intercom-ruby)

Installation

Add this to your Gemfile:

gem "intercom-rails"

bundle install

Usage

In your layout file:

<% if logged_in? %>
  <%= intercom_script_tag({
    :app_id => 'your-app-id'
    :user_id => current_user.id
    :email => current_user.email
    :name => current_user.name
    :created_at => current_user.created_at
    :custom_data => {:plan => "Pro"}}) %>
<% end %>

See IntercomRails::ScriptTagHelper for more details.

License

This project rocks and uses MIT-LICENSE.