{"id":50806763,"url":"https://github.com/mikechiloane/browser-event-instrumentor","last_synced_at":"2026-06-13T02:04:56.174Z","repository":{"id":300786458,"uuid":"1006492332","full_name":"mikechiloane/browser-event-instrumentor","owner":"mikechiloane","description":"Source for the browser tracker to help with the instrumentation of browser events","archived":false,"fork":false,"pushed_at":"2025-06-23T15:21:28.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-23T16:35:31.406Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/mikechiloane.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-22T11:53:26.000Z","updated_at":"2025-06-23T15:21:32.000Z","dependencies_parsed_at":"2025-06-23T16:35:35.452Z","dependency_job_id":"78f9000a-12b0-453f-92de-9ea088e19e94","html_url":"https://github.com/mikechiloane/browser-event-instrumentor","commit_stats":null,"previous_names":["mikechiloane/browser-event-instrumentor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mikechiloane/browser-event-instrumentor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikechiloane%2Fbrowser-event-instrumentor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikechiloane%2Fbrowser-event-instrumentor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikechiloane%2Fbrowser-event-instrumentor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikechiloane%2Fbrowser-event-instrumentor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikechiloane","download_url":"https://codeload.github.com/mikechiloane/browser-event-instrumentor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikechiloane%2Fbrowser-event-instrumentor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34269365,"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-06-13T02:00:06.617Z","response_time":62,"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":"2026-06-13T02:04:55.487Z","updated_at":"2026-06-13T02:04:56.170Z","avatar_url":"https://github.com/mikechiloane.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Recced Browser Event Tracker\n\nA lightweight TypeScript library for tracking user actions and events in the browser. It captures clicks and user activity, batches them, and sends them to a configurable endpoint.\n\n## Features\n\n- Tracks user clicks on elements with an `action-name` attribute\n- Captures page, element, and event metadata\n- Buffers and batches events for efficient network usage\n- Handles session management and user/device identification\n- Sends data reliably on page unload using `sendBeacon`\n- Configurable via simple options\n- Written in TypeScript\n\n## Installation\n\n```\nnpm install\n```\n\n## Building\n\n```\nnpm run build\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Usage\n\n```ts\nimport ActionTracker from 'recced-browser-event-tracker';\n\nconst tracker = ActionTracker.init({\n  endpoint: 'https://your-endpoint.com/track',\n  debug: true, // Optional: enable debug logging\n});\n```\n\nAdd the `action-name` attribute to any element you want to track:\n\n```html\n\u003cbutton action-name=\"signup\"\u003eSign Up\u003c/button\u003e\n```\n\n## Configuration Options\n\nSee [`TrackerConfig`](src/types/tracker_config.ts):\n\n- `endpoint` (string, required): Where to send tracked events\n- `flushInterval` (number, ms): How often to send batches (default: 10000)\n- `maxBatchSize` (number): Max events per batch (default: 20)\n- `sessionTimeout` (number, ms): Session inactivity timeout (default: 30min)\n- `debug` (boolean): Enable debug logs\n- `userId` (string): Override user ID\n\n## Development\n\n- Source code: [src/index.ts](src/index.ts)\n- Types: [src/types/](src/types/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikechiloane%2Fbrowser-event-instrumentor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikechiloane%2Fbrowser-event-instrumentor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikechiloane%2Fbrowser-event-instrumentor/lists"}