{"id":19872665,"url":"https://github.com/morkeleb/js-analytics-react","last_synced_at":"2026-06-13T14:33:08.471Z","repository":{"id":57122330,"uuid":"423738843","full_name":"morkeleb/js-analytics-react","owner":"morkeleb","description":null,"archived":false,"fork":false,"pushed_at":"2022-01-01T19:54:02.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-08T18:28:30.660Z","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/morkeleb.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":"2021-11-02T07:02:21.000Z","updated_at":"2022-01-01T19:54:05.000Z","dependencies_parsed_at":"2022-08-24T14:59:26.831Z","dependency_job_id":null,"html_url":"https://github.com/morkeleb/js-analytics-react","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/morkeleb/js-analytics-react","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morkeleb%2Fjs-analytics-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morkeleb%2Fjs-analytics-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morkeleb%2Fjs-analytics-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morkeleb%2Fjs-analytics-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/morkeleb","download_url":"https://codeload.github.com/morkeleb/js-analytics-react/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morkeleb%2Fjs-analytics-react/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34288664,"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":"2024-11-12T16:16:24.475Z","updated_at":"2026-06-13T14:33:08.454Z","avatar_url":"https://github.com/morkeleb.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @js-analytics/react\n\n@js-analytics/react is a TypeScript library for collecting and reporting errors to https://js-analytics.com.\n\n## Installation\n\nUse the package manager npm or yarn to install @js-analytics/react.\n\n```bash\nnpm install -S @js-analytics/react\n```\n\nor\n\n```bash\nyarn add @js-analytics/react\n```\n\n## Usage\n\nThe monitor works with react error boundaries. By wrapping your react app with the code you want the monitor to keept rack of you can have all errors reported back to js-analytics. Allowing you to fix them according to how often they occur.\n\n```typescript\n\nimport { JSAMonitor } from '@js-analytics/react';\n\n// more code here\n\n// in your render\nreturn (\n  \u003cJSAMonitor pid=\"\u003cYOUR JS-ANALYTICS PROJECT ID\u003e\"\u003e\n    your react code goes here\n    \u003c/JSAMonitor\u003e\n)\n\n```\n\nin Next.js I recommend placing is in the `pages/_app.tsx` file:\n```typescript\n\nimport { JSAMonitor } from '@js-analytics/react';\n\nfunction MyApp({ Component, pageProps, router }) {\nreturn (\n  \u003cJSAMonitor pid=\"\u003cYOUR JS-ANALYTICS PROJECT ID\u003e\"\u003e\n    your react code goes here\n    \u003c/JSAMonitor\u003e\n  );\n}\n\nexport default MyApp;\n```\nThis will capture all errors that occur during server-side render and client-side executions and report them to JS-Analytics.\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorkeleb%2Fjs-analytics-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorkeleb%2Fjs-analytics-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorkeleb%2Fjs-analytics-react/lists"}