{"id":21835853,"url":"https://github.com/vtex/angular-intercom","last_synced_at":"2025-03-21T14:25:46.289Z","repository":{"id":68365280,"uuid":"38833366","full_name":"vtex/angular-intercom","owner":"vtex","description":"Intercom wrapper for Angular","archived":false,"fork":false,"pushed_at":"2015-08-10T18:39:25.000Z","size":124,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":188,"default_branch":"master","last_synced_at":"2025-01-26T10:08:17.451Z","etag":null,"topics":["srv-oms-ui","xp-post-purchase"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vtex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-09T16:53:04.000Z","updated_at":"2019-07-03T20:48:31.000Z","dependencies_parsed_at":"2023-02-27T12:30:12.711Z","dependency_job_id":null,"html_url":"https://github.com/vtex/angular-intercom","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex%2Fangular-intercom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex%2Fangular-intercom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex%2Fangular-intercom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex%2Fangular-intercom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vtex","download_url":"https://codeload.github.com/vtex/angular-intercom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244812976,"owners_count":20514549,"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":["srv-oms-ui","xp-post-purchase"],"created_at":"2024-11-27T20:25:28.850Z","updated_at":"2025-03-21T14:25:46.257Z","avatar_url":"https://github.com/vtex.png","language":"JavaScript","readme":"# Angular Intercom\nIntercom wrapper for Angular\n\n## Usage\n\n### Reference script\n```html\n\u003cscript src=\"ng-intercom.min.js\"\u003e\u003c/script\u003e\n```\n\n### Inject `vtex.intercom`\n```coffeescript\nangular.module 'yourApp', ['vtex.intercom']\n```\n\n### Fill `intercomConfig`\nThis object should contain at least your Intercom application credentials (`app_id`) and main user data, such as name, email, age, etc.\n\n```coffeescript\n.config (intercomConfig) -\u003e\n    intercomConfig.app_id = 'bs8us8hw'\n    intercomConfig.user = window.vtex.topbar.utils.user # `Object`\n\n    # e.g.: Custom widget/button that pops Intercom conversation modal:\n    # intercomConfig.widget =\n    #\tactivator: '#vtex-intercom-widget'\n    # See Intercom docs for more\n```\n\n##### Send all user data you want by extending `intercomUserData` as well\nThis is mainly for extra user data, such as environment of access and all other info your `user` object lacks. Feel free to send whatever back to your Intercom.\n\n```coffeescript\n.value 'intercomUserData',\n    'Store': vtex.topbar.utils.config.store\n    'Environment': vtex.topbar.topbar.environment.match(/beta|stable/)[0] ? 'stable'\n```\n\n### Directive and binding\nDefaults and shortcuts:\n- `intercom-event`: Event name, be creative. ( `String` )\n- `intercom-on`: \"click\" ( *this is what fires events to Intercom*, e.g.: \"hover\", \"mouseleave\" )\n- `intercom-metadata`: Whatever extra info to send along\n\nExample:\n```html\n\u003cbutton id=\"sign-up\" class=\"btn btn-primary\" value=\"Sign Up\"\n\t\t\t\tintercom-event=\"Sign The Duck Up\"\u003e\u003c/button\u003e\n```\n\n### API `intercomService`\n#### trigger eventName, data\n- string `eventName`, Object `data` with any information you want to be registered within the event\n\n#### updateUser data\n- Object `data` with new (full or partial) user data to be updated and send\n\n### Development\nInside `src` you can find this module source code, written in **CoffeeScript**. To build the `.js` and uglify it, install npm dev-dependencies and run grunt:\n\n    (sudo) npm i\n    grunt\n\n**Don't forget to build after updating the version and before committing any changes, since it's version appears in minified files.**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvtex%2Fangular-intercom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvtex%2Fangular-intercom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvtex%2Fangular-intercom/lists"}