{"id":28215611,"url":"https://github.com/compilorama/staly","last_synced_at":"2025-08-05T15:26:14.473Z","repository":{"id":57113586,"uuid":"398635602","full_name":"compilorama/staly","owner":"compilorama","description":"Privacy-first analytics","archived":false,"fork":false,"pushed_at":"2023-09-29T17:12:14.000Z","size":1079,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-25T01:14:09.465Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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}},"created_at":"2021-08-21T18:58:14.000Z","updated_at":"2023-09-29T15:58:37.000Z","dependencies_parsed_at":"2022-08-22T04:50:21.714Z","dependency_job_id":"c96d8cbf-9c19-4561-8f4c-04efc2eaa72a","html_url":"https://github.com/compilorama/staly","commit_stats":null,"previous_names":["compilorama/staly","glorious-codes/glorious-analytics"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/compilorama/staly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compilorama%2Fstaly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compilorama%2Fstaly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compilorama%2Fstaly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compilorama%2Fstaly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compilorama","download_url":"https://codeload.github.com/compilorama/staly/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compilorama%2Fstaly/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268922018,"owners_count":24329412,"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-08-05T02:00:12.334Z","response_time":2576,"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.844Z","updated_at":"2025-08-05T15:26:14.433Z","avatar_url":"https://github.com/compilorama.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Staly\n\n\u003e Privacy-first analytics.\n\n[![CircleCI](https://circleci.com/gh/compilorama/staly/tree/master.svg?style=svg)](https://circleci.com/gh/compilorama/staly/tree/master)\n[![Coverage Status](https://coveralls.io/repos/github/compilorama/staly/badge.svg?branch=master)](https://coveralls.io/github/compilorama/staly?branch=master)\n\n## Installation\n\n```\nnpm install @compilorama/staly --save\n```\n\n## Usage\n\nStaly is based on [Plausible](https://plausible.io/) by default, but you can optionally use another service. See **Adapters** section below to learn more.\n\n``` javascript\nimport Staly from '@compilorama/staly';\n\nconst staly = new Staly();\nstaly.init('glorious.codes');\nstaly.trackPageview();\n```\n\nTo avoid being tracked by any site using Staly, set `analytics` search param as `disabled`. Your preference will be set in a cookie and the following visits won't be tracked even without declaring the analytics search param on url.\n```\nhttps://glorious.codes?analytics=disabled\n```\n\n## API\n\n### `init`\n\n``` javascript\n/*\n** @token: String [required]\n** @options: Object [optional]\n*/\n\n// Domain registered on Plausible\nconst token = 'compilorama.com';\n// Local development is not tracked by default, but you can make it work by\n// setting trackLocalhost option as true on initializaton.\nconst options = { trackLocalhost: true };\nconst staly = new Staly();\n\nstaly.init(token, options);\n```\n\n### `trackPageview`\n\n``` javascript\nstaly.trackPageview();\n```\n\n## Adapters\n\nYou can optionally use Staly with the following adapters. Click over one of them to get specific instructions:\n\n- [Google Analytics](https://github.com/compilorama/staly/blob/master/src/adapters/google-analytics/google-analytics.md)\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/staly.git\n```\n\n3. Go to the project directory:\n``` bash\ncd staly\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%2Fstaly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompilorama%2Fstaly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompilorama%2Fstaly/lists"}