{"id":20170201,"url":"https://github.com/fabrix-app/spool-segment","last_synced_at":"2026-05-31T01:31:21.097Z","repository":{"id":44006346,"uuid":"237045964","full_name":"fabrix-app/spool-segment","owner":"fabrix-app","description":"Spool - Add Segment.io easily to Fabrix app","archived":false,"fork":false,"pushed_at":"2023-01-24T01:15:17.000Z","size":880,"stargazers_count":0,"open_issues_count":16,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T23:37:06.964Z","etag":null,"topics":["fabrix","segmentio","spool"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/fabrix-app.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-29T17:47:14.000Z","updated_at":"2020-01-29T19:05:45.000Z","dependencies_parsed_at":"2023-01-31T14:30:50.248Z","dependency_job_id":null,"html_url":"https://github.com/fabrix-app/spool-segment","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrix-app%2Fspool-segment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrix-app%2Fspool-segment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrix-app%2Fspool-segment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrix-app%2Fspool-segment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabrix-app","download_url":"https://codeload.github.com/fabrix-app/spool-segment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241605820,"owners_count":19989612,"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":["fabrix","segmentio","spool"],"created_at":"2024-11-14T01:17:40.094Z","updated_at":"2026-05-31T01:31:21.085Z","avatar_url":"https://github.com/fabrix-app.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spool-segment\n\n[![Gitter][gitter-image]][gitter-url]\n[![NPM version][npm-image]][npm-url]\n[![Build Status][ci-image]][ci-url]\n[![Test Coverage][coverage-image]][coverage-url]\n[![Dependency Status][daviddm-image]][daviddm-url]\n[![Follow @FabrixApp on Twitter][twitter-image]][twitter-url]\n\n:package: Segment Spool\n\nImplements [Segment](https://segment.io) as a Fabrix spool\n\n[Analytics.js](https://segment.com/docs/connections/sources/catalog/libraries/server/node-js/)\n\nThis spool watches the segment flush property and will emit a fabrix event (`spool:segment:flushed`) when a flush happens.  It will also flush the segment que when unloaded to prevent data loss. \n\n## Install\n```sh\n$ npm install --save @fabrix/spool-segment\n```\n\n## Configure\n\n```js\n// config/main.ts\nimport { SegmentSpool } from '@fabrix/spool-segment'\nexport const main = {\n  spools: [\n    // ... other spools\n    SegmentSpool\n  ]\n}\n```\n\n## Configuration\n\n```js\n // config/segment.ts\nexport const segment = {\n  write_key: '\u003cYOUR WRITE KEY\u003e',\n  flush_at: 1,\n  flush_interval: 1000\n}\n```\n\nFor more information about segment (type and configuration) please see the segment documentation.\n\n## Usage\n\n```js\nconst data = {...}\n\n// You can use the extension directly...\nthis.app.segment.track(data)\n\n// Or as a Promise from the SegmentService...\nreturn this.app.services.SegmentService.track(data)\n\n```\n\n### SegmentService Methods\n\n#### Identify\n\n#### Track\n\n#### Page\n\n#### Group\n\n#### Alias\n\n#### Flush\n\n[npm-image]: https://img.shields.io/npm/v/@fabrix/spool-segment.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/@fabrix/spool-segment\n[ci-image]: https://img.shields.io/circleci/project/github/fabrix-app/spool-segment/master.svg\n[ci-url]: https://circleci.com/gh/fabrix-app/spool-segment/tree/master\n[daviddm-image]: http://img.shields.io/david/fabrix-app/spool-segment.svg?style=flat-square\n[daviddm-url]: https://david-dm.org/fabrix-app/spool-segment\n[gitter-image]: http://img.shields.io/badge/+%20GITTER-JOIN%20CHAT%20%E2%86%92-1DCE73.svg?style=flat-square\n[gitter-url]: https://gitter.im/fabrix-app/fabrix\n[twitter-image]: https://img.shields.io/twitter/follow/FabrixApp.svg?style=social\n[twitter-url]: https://twitter.com/FabrixApp\n[coverage-image]: https://img.shields.io/codeclimate/coverage/github/fabrix-app/spool-segment.svg?style=flat-square\n[coverage-url]: https://codeclimate.com/github/fabrix-app/spool-segment/coverage\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabrix-app%2Fspool-segment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabrix-app%2Fspool-segment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabrix-app%2Fspool-segment/lists"}