|
| 1 | +IntercomRails.config do |config| |
| 2 | + # == Intercom app_id |
| 3 | + # |
| 4 | + config.app_id = ENV["INTERCOM_APP_ID"] || "rtcpj4hf" |
| 5 | + |
| 6 | + # == Intercom session_duration |
| 7 | + # |
| 8 | + # config.session_duration = 300000 |
| 9 | + # == Intercom secret key |
| 10 | + # This is required to enable Identity Verification, you can find it on your Setup |
| 11 | + # guide in the "Identity Verification" step. |
| 12 | + # |
| 13 | + # config.api_secret = "..." |
| 14 | + |
| 15 | + # == Enabled Environments |
| 16 | + # Which environments is auto inclusion of the Javascript enabled for |
| 17 | + # |
| 18 | + config.enabled_environments = ["development", "production"] |
| 19 | + |
| 20 | + # == Current user method/variable |
| 21 | + # The method/variable that contains the logged in user in your controllers. |
| 22 | + # If it is `current_user` or `@user`, then you can ignore this |
| 23 | + |
| 24 | + # config.user.current = proc {} |
| 25 | + |
| 26 | + # == Include for logged out Users |
| 27 | + # If set to true, include the Intercom messenger on all pages, regardless of whether |
| 28 | + # The user model class (set below) is present. |
| 29 | + config.include_for_logged_out_users = true |
| 30 | + |
| 31 | + # == User model class |
| 32 | + # The class which defines your user model |
| 33 | + # |
| 34 | + # config.user.model = Proc.new { User } |
| 35 | + |
| 36 | + # == Lead/custom attributes for non-signed up users |
| 37 | + # Pass additional attributes to for potential leads or |
| 38 | + # non-signed up users as an an array. |
| 39 | + # Any attribute contained in config.user.lead_attributes can be used |
| 40 | + # as custom attribute in the application. |
| 41 | + # config.user.lead_attributes = %w(ref_data utm_source) |
| 42 | + |
| 43 | + # == Exclude users |
| 44 | + # A Proc that given a user returns true if the user should be excluded |
| 45 | + # from imports and Javascript inclusion, false otherwise. |
| 46 | + # |
| 47 | + # config.user.exclude_if = Proc.new { |user| user.deleted? } |
| 48 | + |
| 49 | + # == User Custom Data |
| 50 | + # A hash of additional data you wish to send about your users. |
| 51 | + # You can provide either a method name which will be sent to the current |
| 52 | + # user object, or a Proc which will be passed the current user. |
| 53 | + # |
| 54 | + # config.user.custom_data = { |
| 55 | + # :plan => Proc.new { |current_user| current_user.plan.name }, |
| 56 | + # :favorite_color => :favorite_color |
| 57 | + # } |
| 58 | + # |
| 59 | + config.user.custom_data = {} |
| 60 | + # |
| 61 | + # == Current company method/variable |
| 62 | + # The method/variable that contains the current company for the current user, |
| 63 | + # in your controllers. 'Companies' are generic groupings of users, so this |
| 64 | + # could be a company, app or group. |
| 65 | + # |
| 66 | + # config.company.current = Proc.new { current_company } |
| 67 | + # |
| 68 | + # Or if you are using devise you can just use the following config |
| 69 | + # |
| 70 | + # config.company.current = Proc.new { current_user.company } |
| 71 | + |
| 72 | + # == Exclude company |
| 73 | + # A Proc that given a company returns true if the company should be excluded |
| 74 | + # from imports and Javascript inclusion, false otherwise. |
| 75 | + # |
| 76 | + # config.company.exclude_if = Proc.new { |app| app.subdomain == 'demo' } |
| 77 | + |
| 78 | + # == Company Custom Data |
| 79 | + # A hash of additional data you wish to send about a company. |
| 80 | + # This works the same as User custom data above. |
| 81 | + # |
| 82 | + # config.company.custom_data = { |
| 83 | + # :number_of_messages => Proc.new { |app| app.messages.count }, |
| 84 | + # :is_interesting => :is_interesting? |
| 85 | + # } |
| 86 | + |
| 87 | + # == Company Plan name |
| 88 | + # This is the name of the plan a company is currently paying (or not paying) for. |
| 89 | + # e.g. Messaging, Free, Pro, etc. |
| 90 | + # |
| 91 | + # config.company.plan = Proc.new { |current_company| current_company.plan.name } |
| 92 | + |
| 93 | + # == Company Monthly Spend |
| 94 | + # This is the amount the company spends each month on your app. If your company |
| 95 | + # has a plan, it will set the 'total value' of that plan appropriately. |
| 96 | + # |
| 97 | + # config.company.monthly_spend = Proc.new { |current_company| current_company.plan.price } |
| 98 | + # config.company.monthly_spend = Proc.new { |current_company| (current_company.plan.price - current_company.subscription.discount) } |
| 99 | + |
| 100 | + # == Custom Style |
| 101 | + # By default, Intercom will add a button that opens the messenger to |
| 102 | + # the page. If you'd like to use your own link to open the messenger, |
| 103 | + # uncomment this line and clicks on any element with id 'Intercom' will |
| 104 | + # open the messenger. |
| 105 | + # |
| 106 | + config.inbox.style = :custom |
| 107 | + # |
| 108 | + # If you'd like to use your own link activator CSS selector |
| 109 | + # uncomment this line and clicks on any element that matches the query will |
| 110 | + # open the messenger |
| 111 | + config.inbox.custom_activator = ".intercom" |
| 112 | + # |
| 113 | + # If you'd like to hide default launcher button uncomment this line |
| 114 | + config.hide_default_launcher = true |
| 115 | + # |
| 116 | + # If you need to route your Messenger requests through a different endpoint than the default, uncomment the below line. Generally speaking, this is not needed. |
| 117 | + # config.api_base = "https://#{config.app_id}.intercom-messenger.com" |
| 118 | + # |
| 119 | +end |
0 commit comments