{"id":28215607,"url":"https://github.com/compilorama/statorama","last_synced_at":"2025-08-01T00:04:31.863Z","repository":{"id":244330590,"uuid":"814921074","full_name":"compilorama/statorama","owner":"compilorama","description":"Analytics wrapper for Umami","archived":false,"fork":false,"pushed_at":"2024-06-14T02:42:13.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-19T12:05:34.535Z","etag":null,"topics":[],"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/compilorama.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}},"created_at":"2024-06-14T01:51:27.000Z","updated_at":"2024-06-14T02:42:17.000Z","dependencies_parsed_at":"2024-06-14T03:38:35.919Z","dependency_job_id":"a4f88276-6fdf-4eb7-b2c7-498fd63ec358","html_url":"https://github.com/compilorama/statorama","commit_stats":null,"previous_names":["compilorama/statorama"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/compilorama/statorama","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compilorama%2Fstatorama","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compilorama%2Fstatorama/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compilorama%2Fstatorama/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compilorama%2Fstatorama/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compilorama","download_url":"https://codeload.github.com/compilorama/statorama/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compilorama%2Fstatorama/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267320332,"owners_count":24068528,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"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":"2025-05-17T22:11:23.694Z","updated_at":"2025-08-01T00:04:31.838Z","avatar_url":"https://github.com/compilorama.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Statorama\n\n\u003e Analytics wrapper for Umami\n\n[![CircleCI](https://circleci.com/gh/compilorama/statorama/tree/main.svg?style=svg)](https://circleci.com/gh/compilorama/statorama/tree/main)\n[![Coverage Status](https://coveralls.io/repos/github/compilorama/statorama/badge.svg?branch=main)](https://coveralls.io/github/compilorama/statorama?branch=main)\n\n## Installation\n\n```\nnpm install @compilorama/statorama --save\n```\n\n## Usage\n\nAnalytics wrapper that adds a couple of functionalities on top of Umami SDK:\n- Diasables tracking when a search param `analytics=disabled` is set.\n- Diasables tracking when a local storage item with key/value `analytics=disabled` is found.\n- Disables tracking when user agent is considered a bot.\n\n### Initializating\n\nBy initializing the lib, page view will be tracked automatically\n\n``` javascript\nimport statorama from '@compilorama/statorama';\n\nstatorama.init({\n  // Source where Umami SDK is requested from (required)\n  src: String,\n  // Umami Website ID (required)\n  id: String,\n  // Enable/Diasable tracking arbitrarily (required)\n  enabled: Boolean,\n})\n```\n\n### Tracking Custom Events\n\n``` javascript\nimport statorama from '@compilorama/statorama';\n\nstatorama.track(\n  String, // Event Name (Ex.: 'Button Clicked')\n  Object  // Event Data (Ex.: { name: 'Subscribe' })\n)\n```\n\n## Contributing\n\n1. Install [Node](https://nodejs.org/en/). Download the \"Recommend for Most Users\" version.\n\n2. Clone the repo:\n``` bash\ngit clone git@github.com:compilorama/statorama.git\n```\n\n3. Go to the project directory:\n``` bash\ncd statorama\n```\n\n4. Install the project dependencies:\n``` bash\nnpm install\n```\n\n5. Build the project:\n``` bash\nnpm run build\n```\n\n## Tests\n\nEnsure that all code that you have added is covered with unit tests:\n``` bash\nnpm run test -- --coverage\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompilorama%2Fstatorama","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompilorama%2Fstatorama","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompilorama%2Fstatorama/lists"}