Sha256: 1820d2717da7c7f3d48c6f7f522832897a744369665e8dd763028fe1c67c3f28
Contents?: true
Size: 1.1 KB
Versions: 1
Compression:
Stored size: 1.1 KB
Contents
= IntercomRails Rails helper for creating Intercom (https://www.intercom.io) javascript tags. For interacting with the Intercom API, use the intercom gem (https://github.com/intercom/intercom-ruby) == Installation Add this to your Gemfile: gem "intercom-rails" <code>bundle install</code> == 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 => { }}) %> <% end %> :custom_data allows you to specify any app/user/situational data to associate with the current_user. It will be visible in Intercom, and you'll be able to search/filter/send messages based on it. e.g. :plan => "Pro" or :dashboard_page => 'http://dashboard.example.com/user-id' See IntercomRails::ScriptTagHelper for more details. == Contributors - Dr Nic Williams (@drnic) - provided a rails generator for adding the Intercom javascript tag into your layout. == License This project rocks and uses MIT-LICENSE.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
intercom-rails-0.0.2 | README.rdoc |