{"id":20760561,"url":"https://github.com/swdotcom/swdc-tracker","last_synced_at":"2026-05-27T21:31:03.623Z","repository":{"id":40799924,"uuid":"271154675","full_name":"swdotcom/swdc-tracker","owner":"swdotcom","description":"send swdc events to snowplow","archived":false,"fork":false,"pushed_at":"2025-11-19T02:27:35.000Z","size":9772,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-12-13T22:28:05.010Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swdotcom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-06-10T02:13:31.000Z","updated_at":"2025-09-30T16:18:07.000Z","dependencies_parsed_at":"2024-03-21T23:24:30.762Z","dependency_job_id":"ce4c460e-e3b1-424a-acb9-09c7456d6e02","html_url":"https://github.com/swdotcom/swdc-tracker","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/swdotcom/swdc-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swdotcom%2Fswdc-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swdotcom%2Fswdc-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swdotcom%2Fswdc-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swdotcom%2Fswdc-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swdotcom","download_url":"https://codeload.github.com/swdotcom/swdc-tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swdotcom%2Fswdc-tracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33585203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-17T10:14:23.872Z","updated_at":"2026-05-27T21:31:03.597Z","avatar_url":"https://github.com/swdotcom.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# swdc-tracker\n\n[![npm version](https://badge.fury.io/js/swdc-tracker.svg)](https://badge.fury.io/js/swdc-tracker)\n![main](https://github.com/swdotcom/swdc-tracker/workflows/Build%20and%20Test/badge.svg)\n\nSends data to snowplow. Use this to track events in plugins written in js.\n\n## Install\n\n```\nyarn add swdc-tracker\n```\n\n## Usage\n\nextension.ts\n```ts\n\nimport swdcTracker from 'swdc-tracker'\n\n// initialize it once with the backend api host, namespace and appId\nswdcTracker.initialize(\"https://api.software.com\", \"codetime-events\", \"codetime-vscode\")\n\n```\n\n\n./Utils.ts\n```ts\n\nimport swdcTracker from 'swdc-tracker'\n\nexport function openSomeFile() {\n  swdcTracker.trackEditorAction({\n    jwt: jwt,\n    entity: \"editor\",\n    type: \"activate\",\n    tz_offset_minutes: 420,\n    file_name: \"your_file.js\",\n    file_path: \"/path/to/your_file.js\",\n    file_syntax: \"javascript\",\n    file_line_count: 10,\n    file_character_count: 100,\n    project_name: \"your_project_name\",\n    project_directory: \"/path/to/your/project\",\n    plugin_id: 1,\n    plugin_version: \"1.2.3\"\n  })\n  ...\n}\n```\n\n# Test mode\n\nswdc-tracker has test mode on by default. In order to send events to snowplow, set env `ENABLE_SWDC_TRACKER` to `\"true\"`\n\ntest mode will log the event's properties and contexts so you can easily debug payloads being sent to snowplow.\n\n# Development\n\n## Install Deps\n```\nyarn\n```\n\n## Build\n\n```\nyarn build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswdotcom%2Fswdc-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswdotcom%2Fswdc-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswdotcom%2Fswdc-tracker/lists"}