{"id":15481465,"url":"https://github.com/mike-north/ember-intercom-io","last_synced_at":"2025-04-04T21:11:27.863Z","repository":{"id":2185289,"uuid":"45894545","full_name":"mike-north/ember-intercom-io","owner":"mike-north","description":"Deep intercom.io integration for Ember.js apps","archived":false,"fork":false,"pushed_at":"2025-03-07T17:43:41.000Z","size":3656,"stargazers_count":52,"open_issues_count":20,"forks_count":32,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-28T20:08:01.230Z","etag":null,"topics":["addon","chat","ember-apps","intercom"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mike-north.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-10T07:14:41.000Z","updated_at":"2021-12-06T11:45:42.000Z","dependencies_parsed_at":"2024-04-14T11:25:37.259Z","dependency_job_id":"73f715ed-65e6-4883-87b9-9d9fe7a3d9fd","html_url":"https://github.com/mike-north/ember-intercom-io","commit_stats":{"total_commits":402,"total_committers":15,"mean_commits":26.8,"dds":"0.37064676616915426","last_synced_commit":"bb73ad16423c8216d7f928d65ca4fe56b8a6f0ac"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike-north%2Fember-intercom-io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike-north%2Fember-intercom-io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike-north%2Fember-intercom-io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike-north%2Fember-intercom-io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mike-north","download_url":"https://codeload.github.com/mike-north/ember-intercom-io/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249534,"owners_count":20908212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["addon","chat","ember-apps","intercom"],"created_at":"2024-10-02T05:04:32.823Z","updated_at":"2025-04-04T21:11:27.840Z","avatar_url":"https://github.com/mike-north.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ember-intercom-io\n\n[![Build Status](https://travis-ci.org/mike-north/ember-intercom-io.svg?branch=master)](https://travis-ci.org/mike-north/ember-intercom-io)\n[![Code Climate](https://codeclimate.com/github/mike-north/ember-intercom-io/badges/gpa.svg)](https://codeclimate.com/github/mike-north/ember-intercom-io)\n[![Dependency Status](https://david-dm.org/mike-north/ember-intercom-io.svg)](https://david-dm.org/mike-north/ember-intercom-io)\n[![devDependency Status](https://david-dm.org/mike-north/ember-intercom-io/dev-status.svg)](https://david-dm.org/mike-north/ember-intercom-io#info=devDependencies)\n[![Ember Observer Score](http://emberobserver.com/badges/ember-intercom-io.svg)](http://emberobserver.com/addons/ember-intercom-io)\n\n[Intercom.io](http://intercom.io) integration for Ember.js apps.\n\n## Setup\n\n**Install this addon with ember-cli** `ember install ember-intercom-io`\n\n**Add the `{{intercom-io}}` component to one of your templates`**\nThe chat widget will appear whenever this component has been rendered, and should disappear whenever it's destroyed.\n\n### Configuration\n\n**In your `config/environment.js` file, you must provide your `appId`**\n\n```js\n\nmodule.exports = function(environment) {\n  ...\n  intercom: {\n    appId: null, // \u003c-- REPLACE WITH YOUR INTERCOM.IO app_id\n    enabled: true, // \u003c-- Setting to false in your testing environment prevents unneccessary network requests (true by default)\n    userProperties: {\n      createdAtProp: 'createdAt',\n      emailProp: 'email',\n      nameProp: 'name',\n      userHashProp: 'hash',\n      userIdProp: 'id'\n    }\n  },\n  ...\n};\n\n```\n\n#### Users vs Leads\n\nIn the [intercom.io](http://intercom.io) world, a lead is a visitor to your site or app, without an email or name associated with them. A user has a name and email, and is a good construct for tracking the history of all interactions w/ a single person.\n\nYou can make `ember-intercom-io` aware of a \"user\" context (shifting into \"users\" mode instead of \"leads\" mode) by adding an object to the `intercom` service (i.e., your user authentication service).\n\nWhen the application updates the `intercom.user` object, changes will be sent to Intercom and reflected in your Intercom dashboard.\n\n**app/services/authentication.js**\n\n```js\nimport Service, {inject as service} from '@ember/service';\n\nexport default Service.extend({\n  intercom: service(), // the intercom service\n  didLogin(user) {\n    ...\n    this.get('intercom').set('user.name', 'Joe Username');\n    this.get('intercom').set('user.email', 'joe@example.com');\n    this.get('intercom').set('user.createdAt', 1447135065173);\n  }\n});\n\n```\n\n#### Custom Properties\n\nTo send custom properties on to intercom, add them to the `intercom.user` object. All property names will be underscored prior to being sent.\nundefined values will be removed (however, `null` is kept).\n\n```js\n  let customProperties = {\n    myCustomThing: 1,\n    numberOfCats: false,\n    notDefined: undefined\n  }\n  set(this, 'intercom.user', customProperties);\n```\n\nbecomes\n\n```js\n{\n  my_custom_thing: 1,\n  number_of_cats: false\n}\n```\n\n## API\n\nThe `intercom` service exposes several public API methods that match Intercom.com's\nexisting Javascript API. For full details on the client API, [read the Intercom docs.](https://developers.intercom.com/v2.0/docs/intercom-javascript#section-intercomonhide)\n\n### Properties\n\n|    Name      |      Type         |\n---| --- | \n| autoUpdate   | Boolean           |\n| hideDefaultLauncher | Boolean    |\n| isOpen       | Boolean           |\n| isBooted     | Boolean           |\n| unreadCount  | Integer           |\n| user         | Object            |\n\n### Methods\n\nThe following intercom methods are implemented. See `services/intercom.js` for full\ndetails.\n\n`boot()`\n\n`update()`\n\n`shutdown()`\n\n`hide()`\n\n`show()`\n\n`showMessages()`\n\n`showNewMessage()`\n\n`trackEvent()`\n\n`getVisitorId()` Returns the current id of the logged in user.\n\n`startTour()` Your intercom account needs to support product tours\n\n### Events\n\nSubscribe to events in your app with event listeners:\n\n```js\n//fancy-component.js\n\n...\n\nintercom: service(),\nnewMessageAlert: on('intercom.unreadCountChange', function() {\n    alert('Unread Count Changed!');\n}),\n\n...\n\n```\n\n**Available Events**\n\n(Read the Intercom documentation for full details)[https://developers.intercom.com/v2.0/docs/intercom-javascript#section-intercomonhide]\n\n| Ember Event | Intercom Event |\n--- | --- |\n| hide        | `onHide`       |\n| show        | `onShow`       |\n| unreadCountChange | `onUnreadCountChange` |\n\n\n## Installation\n\n- `git clone` this repository\n- `npm install`\n\n### Linting\n\n- `npm run lint:hbs`\n- `npm run lint:js`\n- `npm run lint:js -- --fix`\n\n### Running tests\n\n- `ember test` – Runs the test suite on the current Ember version\n- `ember test --server` – Runs the test suite in \"watch mode\"\n- `ember try:each` – Runs the test suite against multiple Ember versions\n\n### Running the dummy application\n\n- `ember serve`\n- Visit the dummy application at [http://localhost:4200](http://localhost:4200).\n\nFor more information on using ember-cli, visit [http://www.ember-cli.com/](http://www.ember-cli.com/).\n\nCopyright (c) 2015 Levanto Financial, 2016-18 [Mike Works](https://mike.works), Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmike-north%2Fember-intercom-io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmike-north%2Fember-intercom-io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmike-north%2Fember-intercom-io/lists"}